| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Limit and Randomize Your Upselling Links (Related Products) | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Limit and Randomize Your Upselling Links (Related Products)
Hello,
This is a simple mod that I hope others might be able to use. I wanted to completely change the product.tpl page and so I've modified it to bring more information higher on the page (above the crease). This mod is specifically about the Upselling Products module. What I wanted to do: I have alot of products that have 10-12 upselling links and that would cause my layout to look horrible so I decided to limit the number that would show at any given time to 4. At the same time I didn't want the same 4 to show all the time, I wanted to randomize all 10-12 but only show 4. View it here: http://www.birdshopper.com/xcart/product.php?productid=45&cat=10&page=1 Change this line in skin1/modules/Upselling_Products/related_products.tpl: {section name=cat_num loop=$product_links} to look like {section name=cat_num loop=$product_links max=4} This is my related_products.tpl: Code:
In order to randomize all the upselling products, open /modules/Upselling_Products/related_products.php and change the query statement by changing the ORDER BY to ORDER BY RAND() See my code below: Code:
Basically 2 lines of code to set max # to show and then to randomize within the product all the upselling links. Louise
__________________
Louise Studio 57 Designs - X-Cart Customization Providing X-Cart Services since 2004 Hottest Blog Directory - Submit Your Blog for a Free Listing |
|||||||||
#2
|
|||||||
|
|||||||
dalmuti,
Which file and code did u modify to move the related products with PICTRES on the right right? That's exactly what i wanted to do.. I wanted to change the table on product.tp a little bit.. i moved the options and detail above the description.. But i can't get the description to align to the left to start right under the thumbnail picture. and have the related product showup to the right with it's respective pictures.. that would be PERFECT! can u help me out? THanx a mil.
__________________
hyratech X-CART Gold 4.1.10 Hosted - Unix |
|||||||
#3
|
|||||||||
|
|||||||||
The product file to modify is product.tpl. But, I reduced all the code on in the template by creating separate files of each section of the product.tpl and then including them. Makes the code easier to read and follow.
So, I have a productdescription.tpl, a productoption.tpl....etc. As far as the modification, I use Frontpage....just to get the visual design I want and then copy and paste into X-Cart...making sure not to get a bunch of extra code (as Frontpage is known for). Here is my product.tpl code: Code:
Hope it helps....to understand the concept.
__________________
Louise Studio 57 Designs - X-Cart Customization Providing X-Cart Services since 2004 Hottest Blog Directory - Submit Your Blog for a Free Listing |
|||||||||
#4
|
|||||||
|
|||||||
I kinda get the concept.. but.. there's the deal..
I'm not too good witht he codes.. I got the layout... working witht he default file.. i did this: I remove this line: Code:
and moved it to a new table right below it . that table has 2 columns. one for the description. and one saved for the related products.. Her's my question: what's the include code to get the "upselling" products to show up in that cell? one on top of each other with the pictures? Thanx alot..
__________________
hyratech X-CART Gold 4.1.10 Hosted - Unix |
|||||||
#5
|
|||||||
|
|||||||
I hope this helps..
this is my site, please look at it so it'll clear up with what' i'm talking about. http://<br /> <a href="http://www.atgsm.com/shop/product.php?productid=38&cat=0&page=1" target="_blank">h...ge=1</a><br /> I want to move the "Customer Also Bought" Section to that area with the error codes
__________________
hyratech X-CART Gold 4.1.10 Hosted - Unix |
|||||||
#6
|
|||||||||
|
|||||||||
{ include file = "modules/Upselling_Products/related_products.tpl" }
Did you use the code above. I see a "" at the beginning and end ""? Louise
__________________
Louise Studio 57 Designs - X-Cart Customization Providing X-Cart Services since 2004 Hottest Blog Directory - Submit Your Blog for a Free Listing |
|||||||||
|
|||
X-Cart forums © 2001-2020
|