If you have already created a Choose Options button, move it to /templates/YourTempate/images/color. It must be named ChooseOptionButton.gif. If you have not created a Choose Options button, then for testing purposes, copy any button in that folder such as CheckoutButton.gif and rename it ChooseOptionButton.gif.
What you will be doing is creating a new Global variable called ProductAddImage in CategoryContent.php and displaying it through Snippet.CategoryProductsItem.html
This has been tested through Version 5.05. If you have any questions, contact Novista Web @ http://www.novistaweb.com
STEP 1:
Edit /includes/display/CategoryContent.php. Find the following code:
Code: Select all
if (isId($row['prodvariationid']) || trim($row['prodconfigfields'])!='') {
$GLOBALS['ProductURL'] = ProdLink($row['prodname']);
$GLOBALS['ProductAddText'] = GetLang('ProductChooseOptionLink');
} else {
$GLOBALS['ProductURL'] = CartLink($row['productid']);
$GLOBALS['ProductAddText'] = GetLang('ProductAddToCartLink');
}
Code: Select all
if (isId($row['prodvariationid']) || trim($row['prodconfigfields'])!='') {
$GLOBALS['ProductURL'] = ProdLink($row['prodname']);
$GLOBALS['ProductAddText'] = GetLang('ProductChooseOptionLink');
$GLOBALS['ProductAddImage'] = 'ChooseOptionButton.gif'; //<--- new
} else {
$GLOBALS['ProductURL'] = CartLink($row['productid']);
$GLOBALS['ProductAddText'] = GetLang('ProductAddToCartLink');
$GLOBALS['ProductAddImage'] = 'AddCartButton.gif'; //<--- new
}
Open Snippets.CategoryProductsItem.html and find:
Code: Select all
<div class="ProductActionAdd" style="display:%%GLOBAL_HideActionAdd%%;">
<a href="%%GLOBAL_ProductURL%%">%%GLOBAL_ProductAddText%%</a>
</div>
Code: Select all
<div class="ProductActionAdd" style="display:%%GLOBAL_HideActionAdd%%;">
<a href="%%GLOBAL_ProductURL%%"><img src="%%GLOBAL_TPL_PATH%%/images/%%GLOBAL_SiteColor%%/%%GLOBAL_ProductAddImage%%" alt="" /></a>
</div>