Zen Follower
- Join Date:
- May 2009
- Posts:
- 105
- Plugin Contributions:
- 0
can I show model number in Recently Viewed sidebox?
Can you let me know the code for showing model number in the Recently Viewed sidebox?
Started by nishajh on 22 Sep 2009, 11:23 PM · Views: 1,424
Zen Follower
Can you let me know the code for showing model number in the Recently Viewed sidebox?
Oba-san
Adapt the code as shown for your other sidebox ... :smile:
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
Zen Follower
How to change the code in tpl_recently_viewed.php in template folder?
'<td><div class="recent-products-name"><a href="' . $link . '">' . zen_get_products_name($recent_product, $_SESSION['languages_id']) . '</a></div><div class="rent-products-price">' . zen_get_products_display_price($recent_product) . '</div></td>' . "\n" .
Thanks
Oba-san
Make sure the products_model is included in the SELECT statement then reference it in the template ...
Or, use the function to call it from the functions_lookups.php file:
/*
* Return any field from products or products_description table
* Example: zen_products_lookup('3', 'products_date_added');
*/
function zen_products_lookup($product_id, $what_field = 'products_name', $language = '') {
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
Zen Follower
could not get it right. Can you please give the codes?
Oba-san
Find the variable for the products_id in the sidebox ...
Then use:
zen_products_lookup($your_products_id, 'products_model')
to get the products_model of that products_id ...
So if the sidebox is using:
$recent_product
for the products_id then use:
zen_products_lookup($recent_product, 'products_model')
something like:
'<td><div class="recent-products-name"><a href="' . $link . '">' . zen_get_products_name($recent_product, $_SESSION['languages_id']) . zen_products_lookup($recent_product, 'products_model') . '</a></div><div class="rent-products-price">' . zen_get_products_display_price($recent_product) . '</div></td>' . "\n" .
Linda McGrath
If you have to think ... you haven't been zenned ...
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!
Tell staff why this post should be reviewed.