Forums / Setting Up Categories, Products, Attributes / Changing "Also Purchased" Display

Changing "Also Purchased" Display

Locked

Views: 922

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
27 Jun 2007, 9:03 PM
#1
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

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.

[B]
$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);
[/B]

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

28 Jun 2007, 4:16 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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:

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!

29 Jun 2007, 2:21 PM
#3
margecc avatar

margecc

Zen Follower

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
234
Plugin Contributions:
0

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

30 Jun 2007, 8:26 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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!