Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Short description for Product Recommends

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-19-2008, 12:04 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Short description for Product Recommends

I'm trying to show the short description for the recommend products and am working with the file /modules/Recommended_Products/recommends.tpl

Throwing {$product.descr} simply echoes the short description of the product the customer is looking at, not the recommends. So I'm wondering how I can call on the short description of each product recommendation.

Any ideas?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #2  
Old 06-19-2008, 12:32 AM
 
Jerrad Jerrad is offline
 

X-Adept
  
Join Date: Nov 2004
Location: The Netherlands
Posts: 484
 

Default Re: Short description for Product Recommends

Did you tried this:

{$recommends[num].descr}
__________________
X-Cart 4.0.12
Heavy modified with paid, free and forum mods.
PHP 5.2.5 | MYSQL 5.0.51a
Reply With Quote
  #3  
Old 06-19-2008, 12:55 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: Short description for Product Recommends

I just did, but nothing is returned -- just blank.
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #4  
Old 06-19-2008, 06:06 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Short description for Product Recommends

Quote:
Originally Posted by tqualizerman
I just did, but nothing is returned -- just blank.

I am not sure that this is a good solution, but it was invented for 5 minutes.

Open file "include/func/func.product.php" and find next lines:
PHP Code:
$fields[] = "$sql_tbl[products].productid";
    
$fields[] = "$sql_tbl[products].provider"

add after this text next line:
PHP Code:
$fields[] = "$sql_tbl[products].descr"

.... now you can use in the template /modules/Recommended_Products/recommends.tpl variable:

{$recommends[num].descr}
Reply With Quote
  #5  
Old 06-19-2008, 08:45 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: Short description for Product Recommends

Awesome, that worked flawlessly.

Another question I had was along the same lines and probably requires a similar edit (I think.)

Would it be possible to add an 'add to cart' button into the Upselling/Related products module?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #6  
Old 06-20-2008, 12:18 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Short description for Product Recommends

Quote:
Originally Posted by tqualizerman
Awesome, that worked flawlessly.

Another question I had was along the same lines and probably requires a similar edit (I think.)

Would it be possible to add an 'add to cart' button into the Upselling/Related products module?

Add the following line for every products in the file "skin1/modules/Upselling_Products/related_products.tpl"


PHP Code:
<a href="cart.php?mode=add&productid={$product_links[cat_num].productid}&amount=1">Add to cart</a

Instead of text "Add to cart", you can use image or button.
Reply With Quote

The following user thanks Yurij for this useful post:
lash (11-16-2009)
  #7  
Old 06-20-2008, 09:39 PM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: Short description for Product Recommends

Thanks again Yurij,

Worked flawleslly.
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #8  
Old 11-11-2009, 04:16 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Short description for Product Recommends

How can you add a buy now button to 4.2.1 for this?
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:46 PM.

   

 
X-Cart forums © 2001-2020