Zen Cart Logo
Forums / General Questions / can I show model number in Recently Viewed sidebox?

can I show model number in Recently Viewed sidebox?

Locked

Views: 1,423

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
22 Sep 2009, 11:23 PM
#1
nishajh avatar

nishajh

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?

24 Sep 2009, 6:36 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: can I show model number in Recently Viewed sidebox?

Adapt the code as shown for your other sidebox ... :smile:

http://www.zen-cart.com/forum/showthread.php?t=137247

25 Sep 2009, 8:25 AM
#3
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

Re: can I show model number in Recently Viewed sidebox?

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

26 Sep 2009, 3:49 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: can I show model number in Recently Viewed sidebox?

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 = '') {
29 Sep 2009, 8:37 AM
#5
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

Re: can I show model number in Recently Viewed sidebox?

could not get it right. Can you please give the codes?

29 Sep 2009, 1:00 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: can I show model number in Recently Viewed sidebox?

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" .