Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011
    Posts
    2
    Plugin Contributions
    0

    Default "add buy it now buttons" mod is displaying button above img and not below it..

    v1.3.9h is my zen cart..

    Has never been upgraded...

    somewhere in this code.. the img for the button ... is being told to be on top of the product description and image. so the button is not below all that which would make more sense on proportion.. ( below is the original code and the code i replaced to give the button " buy it now" )

    here is the code below maybe someone can help figure it out how i can get the button to display on the bottom of the description/picture instead of above. thanks

    If you want to add a buy now button in featured products on index page go to /includes/modules/featured_products.php
    find around line 68 the code

    PHP Code:
    $products_price zen_get_products_display_price($featured_products->fields['products_id']);
    if (!isset(
    $productsInCategory[$featured_products->fields['products_id']])) $productsInCategory[$featured_products->fields['products_id']] = zen_get_generated_category_path_rev($featured_products->fields['master_categories_id']);
    $list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' ' ' 'style="width:' $col_width '%;"',
    'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<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(DIR_WS_IMAGES $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTHIMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><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']) . '">' $featured_products->fields['products_name'] . '</a><br />' $products_price); 
    and replace with

    PHP Code:
    $products_price zen_get_products_display_price($featured_products->fields['products_id']);
    $products_desc substr(strip_tags(trim(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))),0,100).'&hellip;';
    $buy_now_link zen_get_buy_now_button($featured_products->fields['products_id'],'<a href="' zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' $featured_products->fields['products_id']) . '">' zen_image_button(BUTTON_IMAGE_BUY_NOWBUTTON_BUY_NOW_ALT) .'<br/>'.'</a>&nbsp;<br /');
    if (!isset(
    $productsInCategory[$featured_products->fields['products_id']])) $productsInCategory[$featured_products->fields['products_id']] = zen_get_generated_category_path_rev($featured_products->fields['master_categories_id']);
    $list_box_contents[$row][$col] = array('params' =>'class="back"' ' ' 'style="width:' $col_width  .'%;">'.$buy_now_link,
    'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<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(DIR_WS_IMAGES .$featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTHIMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a></div><p>') . '<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']) . '">' $featured_products->fields['products_name'] . '</a></p>'$products_price); 
    Last edited by herb; 10 Feb 2011 at 06:33 AM.

  2. #2
    Join Date
    Feb 2011
    Posts
    2
    Plugin Contributions
    0

    Default Re: "add buy it now buttons" mod is displaying button above img and not below it..

    the first code is for refrence , the second code is the one that needs editing.. thanks

 

 

Similar Threads

  1. v151 Getting rid of "add to cart" and just have a "buy" button
    By BryanKollar in forum General Questions
    Replies: 5
    Last Post: 22 Feb 2014, 06:41 PM
  2. Extra "Buy Now" buttons for Buy 1, Buy 2, Buy 3, Buy 4 etc...
    By AndyVI in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Mar 2011, 06:15 PM
  3. Add "Buy Now" button on a simple HTML page
    By daman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Apr 2008, 06:25 PM
  4. How to add "Buy Now" button?
    By bluealice in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Oct 2007, 01:57 PM
  5. [not a bug] uncertain with "Buy Now" Buttons
    By graper in forum Bug Reports
    Replies: 3
    Last Post: 15 Aug 2006, 04:08 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