X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Bestsellers modification (https://forum.x-cart.com/showthread.php?t=40325)

tqualizerman 06-06-2008 09:59 AM

Bestsellers modification
 
Hi everyone,

I am attempting to get 'Bestsellers' to display on every page of my store, and have modified it to display in the third column. I have basically use an {include file="modules/Bestsellers/bestsellers.tpl"} statement in home.tpl for where I want the bestsellers to display and it works flawlessly on certain pages, like the main store front or within the product catalogue.

However when I navigate to gift certs, or advanced search it won't display anything from bestsellers.tpl and I can't figure out why.

Can anyone provide some insight here?

dtran 06-06-2008 11:13 AM

Re: Bestsellers modification
 
hello tqualizerman,

The bestseller menu displays bestsellers within the current category, that's why you're not able to see the product listings on certain pages. i.e. Try this post http://forum.x-cart.com/showthread.php?t=6073&highlight=bestseller which contains some mod that may do what you're looking for.

Thanks,

tqualizerman 06-06-2008 11:33 AM

Re: Bestsellers modification
 
Thanks for the link.

After looking through the thread I think much of what was discussed is what I need to do, but the code seems to all be outdated.

Has anyone got a bestsellers modification which can simply be plugged into any page to show the overall best selling products in the store (regardless of category)??

dtran 06-06-2008 02:22 PM

Re: Bestsellers modification
 
No problem,


If you can't find a mod out there you can try the code on the 4th page of the post.

PHP Code:

if ($active_modules["Bestsellers"])
include 
$xcart_dir."/modules/Bestsellers/bestsellers.php"


Add the above code underneath the following code

PHP Code:

if ($active_modules["Manufacturers"])
include 
$xcart_dir."/modules/Manufacturers/customer_manufacturers.php"



in files giftcert.php and search.php on the root folder.
(* make sure you backup your file *)
I've tested it on ver 4.1.9 and 4.1.10 it's showing up.

Thanks,

tqualizerman 06-07-2008 09:12 AM

Re: Bestsellers modification
 
derrRrRrrr.....


I thought I was working with outdated code because until now I've only uncovered the .TPL files but now I see all of this is referring to the still-very-much-used .PHP files...fairly simple mod once you come to this realization.

Thanks for pointing me in the right direction.

tqualizerman 07-30-2008 10:19 PM

Re: Bestsellers modification
 
Can anyone advise how to implement this code into a static page?

Jon 07-30-2008 10:30 PM

Re: Bestsellers modification
 
Add this code to pages.php

Code:

if ($active_modules["Bestsellers"])
include $xcart_dir."/modules/Bestsellers/bestsellers.php"; 


Ensure that parsing of smarty tags in static pages is enabled.

Include your bestsellers.tpl in your static page.


All times are GMT -8. The time now is 09:28 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.