Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    234
    Plugin Contributions
    0

    Default Changing "Also Purchased" Display

    I am changing the also purchased display to include just the manufacturer name, then the model number then the price. The problem is the price shows as whatever the current product they are viewing. IE if the product is $16.33 the price on all the Also Purchased products is $16.33.

    Code:
    [FONT=System]
    $also_purchased_products->fields['products_name'] = zen_get_products_name($also_purchased_products->fields['products_id']);
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsAlsoPurch"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => (($also_purchased_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($also_purchased_products->fields['products_id']), 'products_id=' . $also_purchased_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $also_purchased_products->fields['products_image'], $also_purchased_products->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . $products_manufacturer . '<br />' . '<a href="' . zen_href_link(zen_get_info_page($also_purchased_products->fields['products_id']), 'products_id=' . $also_purchased_products->fields['products_id']) . '">' . $also_purchased_products->fields['products_model'] . '</a><br />' . $products_price);
    [/FONT]
    I added the model part to the includes\classes\db\mysql\define_queries.php file, but I can't seem to get the price to come also.
    Thanks, Colleen
    www.af-company.com
    To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Changing "Also Purchased" Display

    $products_price is the current product price ... you need to get your own product price from the actual product you are displaying in the also purchased ...

    This can be obtained with the function:
    PHP Code:
    zen_get_products_display_price($products_id_to_get_price
    where $products_id_to_get_price is the products_id of the specific product you are trying to display the price of ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    234
    Plugin Contributions
    0

    Default Re: Changing "Also Purchased" Display

    Would I sound really stupid if I asked which file was I to plug this into? The queries file or the also purchased file. I assume queries, but then do I call $products_id_to_get_price in the also purchased file.
    Thanks, Colleen
    www.af-company.com
    To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Changing "Also Purchased" Display

    In the module for also_purchased_products.php you would need to add something to get the current price ...

    Using that function you can get the display price like the centerboxes have ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Turning off my "also purchased" does not work
    By MK1990 in forum General Questions
    Replies: 3
    Last Post: 1 Dec 2011, 09:16 PM
  2. "Also Purchased" Not Displaying on Product Info Page
    By nlcabrera in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Sep 2010, 11:31 PM
  3. Replies: 1
    Last Post: 1 Apr 2010, 10:22 AM
  4. "Also Purchased" area above checkout box...
    By NovaBandit in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Jan 2008, 09:47 PM
  5. Reset the "Also purchased" module in "product info"
    By Char3 in forum General Questions
    Replies: 6
    Last Post: 8 Jul 2007, 04:42 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