The default on the Featured Products box on the home page just had a link to the product details if you clicked on the product name or the image. But this wasn't obvious to my visitors. I kept getting emails that said they couldn't figure out how to add it to the cart. So I created a big obvious button that says Product Details.
Note that I didn't just want to have an Add to Cart button because one of my products requires the visitor to choose color, mount, etc. and I didn't want to have all these drop downs on my home page.
I know there have been lots of posts about how to add things to the Featured Products page, but after reading them, I still didn't get it.
But I got it to work, so thought I'd post it.
So to do it:
- Create a gif for your product details button. Name it button_product_details.gif and put it in the includes/templates/YOURTEMPLATE/buttons/english folder.
- Edit includes/languages/english/YOURTEMPLATE/button_names.php. Add these two lines:
Code:define('BUTTON_IMAGE_PRODUCT_DETAILS', 'button_product_details.gif'); define('BUTTON_PRODUCT_DETAILS_ALT', 'Product Details');- In includes/modules/YOURTEMPLATE/featured_products.php (make a backup first), find the section near the bottom that starts with $list_box_contents[$row][$col] =
- Figure out where you want to add the button. I wanted to have it last, after the product price. In my template (cherry zen), that section ends with . $products_price);. So I changed
. $products_price);
to
Code:. $products_price . '<br /><a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'cPath=' . $productsInCategory[$featured_products->fields['products_id']] . '&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_PRODUCT_DETAILS , BUTTON_PRODUCT_DETAILS_ALT) . '</a><br />');
If you want to see what this looks like, you can check out my site
Pet Exercise Wheels
It's not a very fancy site, but I'm not much of a PHP programmer.
So anyway, hope this was helpful.



