Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Feb 2008
    Posts
    129
    Plugin Contributions
    0

    Default Adding a Product Details Button to the Featured Products Page

    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:
    1. 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.

    2. 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');
    3. 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] =

    4. 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.
    Last edited by susb8383; 7 Jul 2009 at 10:17 PM. Reason: Forgot to subscribe by email

 

 

Similar Threads

  1. Trying to remove the Details button from featured products on the main page (only)
    By bodkin77 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Jul 2013, 04:16 PM
  2. Adding more than just 3 products to the featured product box
    By peter3827 in forum Basic Configuration
    Replies: 2
    Last Post: 28 Apr 2009, 07:32 PM
  3. make product details show up in "featured products" center box on main page
    By traypup in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Mar 2009, 01:41 AM
  4. Adding additional Product Details to the Product Info Page??
    By Adrian88 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 Jan 2009, 09:38 AM
  5. Replies: 0
    Last Post: 9 Sep 2008, 03:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg