Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: featured sidebox add to cart/more info

    retract-

    I only have 1 featured, 1 new and 1 special product side-box

    you are correct when I changed it to three products the buttons picked up the first products id.

    I will play with it a little

  2. #12
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: featured sidebox add to cart/more info

    I'll watch to see if you come up with something. You certainly know more than me!

  3. #13
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: featured sidebox add to cart/more info

    this is the complete code for:
    /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_featured.php

    and it works with multiple products activated for the features sidebox

    PHP Code:
    <?php /**  * Side Box Template  *  * @package templateSystem  * @copyright Copyright 2003-2010 Zen Cart Development Team  * @copyright Portions Copyright 2003 osCommerce  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0  * @version $Id: tpl_featured.php 17617 2010-09-25 20:13:29Z drbyte $  * @rbarbour zcadditions alterations 2012-01-21  */        

    $content "";   
    $content .= '<div class="sideBoxContent centeredContent">';   $featured_box_counter 0;   while (!$random_featured_product->EOF) {     $featured_box_counter++;     $featured_box_price zen_get_products_display_price($random_featured_product->fields['products_id']);     $content .= "\n" '  <div class="sideBoxContentItem">';     $content .=  '<a href="' zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' $random_featured_product->fields["products_id"]) . '">' zen_image(DIR_WS_IMAGES $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT);     $content .= '<br />' $random_featured_product->fields['products_name'] . '</a>';     $content .= '<div>' $featured_box_price '</div>';
    if (
    zen_has_product_attributes($random_featured_product->fields['products_id'])) {
    $content .= '<div>' '<a href="' .  zen_href_link(zen_get_info_page($random_featured_product->fields['products_id']),  'cPath=' .  zen_get_generated_category_path_rev($random_featured_product->fields['master_categories_id'])  . '&products_id=' .  $random_featured_product->fields['products_id']) . '">' .  zen_image_button(BUTTON_MORE_INFO_SMALLBUTTON_MORE_INFO_SMALL_ALT) .  '</a></div>';
    } else {
    $content .= '<div>' '<a href="' .  zen_href_link(zen_get_info_page($random_featured_product->fields['products_id']),  'cPath=' .  zen_get_generated_category_path_rev($random_featured_product->fields['master_categories_id'])  . '&products_id=' .  $random_featured_product->fields['products_id']) . '">' .  zen_image_button(BUTTON_MORE_INFO_SMALLBUTTON_MORE_INFO_SMALL_ALT) .  '</a><a href="' zen_href_link($_GET['main_page'],  zen_get_all_get_params(array('action')) .  'action=buy_now&products_id=' .  $random_featured_product->fields['products_id']) . '">' .  zen_image_button(BUTTON_IMAGE_BUY_NOW_SMALLBUTTON_BUY_NOW_SMALL_ALT,  'class="sideBoxContentItemBuyNowImage"') . '</a></div>';
    }
    $content .= '</div>';     
    $random_featured_product->MoveNextRandom();   
    }   
    $content .= '</div>' "\n";

  4. #14
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: featured sidebox add to cart/more info

    Thank you, the new code in your post #13 works perfectly now. I have implemented it on the live store (link in signature) both in English and Greek pages.

    Looking forward to your new upgraded site, although I will be away from the computer and will see it after the 23rd of February.

    Kind regards and thanks again!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Add to Cart/More Info
    By top hatt in forum Customization from the Admin
    Replies: 6
    Last Post: 27 Oct 2011, 04:15 PM
  2. Add More Info Button To Featured Products?
    By gaffettape in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Sep 2010, 05:13 PM
  3. Add Pages to More Info Sidebox addon question
    By Maynards in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 12 May 2010, 08:32 PM
  4. Add more info to Manufacturer sidebox
    By teva in forum Basic Configuration
    Replies: 0
    Last Post: 12 May 2009, 12:48 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR