| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Random Products - 2 Products Per Row - In Place of Featured | ||||
|
|
Thread Tools | Search this Thread |
#31
|
|||||||
|
|||||||
Really glad you like it and it works for you.
__________________
ex x-cart guru |
|||||||
#32
|
|||||||
|
|||||||
Quote:
I have a rather large DB myself, and the random idea is cool but I'm probably going to stick with the featured products list. However, I do like the two items idea. I was wondering how we could modify the featured products tpl to allow two items to appear on one row ? I tried doing it myself within the loop, but I can't figure out how to use smarty's code to generate my own counter variable and increment it each run, so I can use a modulus comparison to print out a </TR><TR> after every second row. Any help would be appreciated..
__________________
Tim |
|||||||
#33
|
|||||||
|
|||||||
if you use the code in http://forum.x-cart.com/viewtopic.php?p=10593#10593 this will work for featured products aswell.
__________________
ex x-cart guru |
|||||||
#34
|
|||||||
|
|||||||
I keep getting an error with my random.php:
Quote:
my line 16 is the line with the actual rand function. Could this function be disallowed by my server? This is line 16: Code:
Made the switch while live (my site doesn't get much traffic yet anyway) so I would like to get this straightened out quick. Thanks |
|||||||
#35
|
|||||||
|
|||||||
I have got it working but I am doing the random part in the SQL query. My random.php is now:
Code:
This seems easy enough to me, are there any drawbacks to doing it this way? I also added the original featured products back into the random.tpl so now I can specify one or two perminant featured products (with the X-cart module) and have two random ones. Any other sugestions? This seems too easy compared to other solutions . |
|||||||
#36
|
|||||||||
|
|||||||||
What i did i do wrong? I get this error:
Fatal error: Call to undefined function: func_query() in /home/virtual/site110/fst/var/www/html/acart/customer/random.php on line 3 I'm a little confused with random.php or randoms.php. |
|||||||||
#37
|
|||||||||
|
|||||||||
Where do I put this? it seems to be the only step I cant figure out.
thanks Quote:
|
|||||||||
#38
|
|||||||||
|
|||||||||
Could someone help me with this?
|
|||||||||
#39
|
|||||||
|
|||||||
From this post
Code:
Where in the home.php code does the include string go, or should it be 'require' instead of 'include'? Should the random.php file go into the customer/ directory, or customer/main/ ? Thanx |
|||||||
#40
|
|||||||||
|
|||||||||
Quote:
Nope you did it the more efficient way. Using mysql to do the random select and limit is way more efficient than the other methods. Also means nothing heavy happens on the database I was reading this thread and thinking why don't they just use the mysql ORDER BY RAND() LIMIT 10. Saves on all the counting products, randomising seeds and stuff. Nice one. Note to others, using ORDER BY RAND() LIMIT in any sql statement will randomise your results for you. Very handy for having random offers/news/quote showing.
__________________
Groovico Used by X-carters the world over: Marketing Manager Pro Bundle For X-cart Featured Product Manager for X-cart Feed manager pro for X-cart http://www.firetanksoftware.com Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X |
|||||||||
|
|||
X-Cart forums © 2001-2020
|