![]() |
Re: Random Image or Random Products - Category Specific
I too would love to see this mod ported to 4.4.x...anyone?
:D |
Re: Random Image or Random Products - Category Specific
Original instructions -> http://forum.x-cart.com/showpost.php?p=102302&postcount=1
The modified instructions (4.4.x): Quote:
|
Re: Random Image or Random Products - Category Specific
Awesome. Thanks Alex!
|
Re: Random Image or Random Products - Category Specific
Is it possible to use the tag inside a static page? For instance on the F.A.Q. page, have it display a random product image by entering the tag in the WYSIWYG code area?
Thanks for the new version. I have it on my 4.1.9 and want it for the 4.4.4 version. |
Re: Random Image or Random Products - Category Specific
Hi, Alex,
Just tried the patch on 4.4.4 and got the following error: SQL PATCH FAILED AT QUERY: INSERT INTO `xcart_modules` VALUES ( , 'Random_Products', 'This module displays random products', 'Y') |
Re: Random Image or Random Products - Category Specific
Acqua,
Have you tried running the patch through phpMyAdmin? Also try removing the ' around the table names. The patch is failing at the first query, is there an error message? |
Re: Random Image or Random Products - Category Specific
Hi, Mike, thanks for the reply.
|
Re: Random Image or Random Products - Category Specific
the list of random products returned/displayed does not have it's URL, ie <a href=""> is returned.
Does anyone know how to fix this? |
Re: Random Image or Random Products - Category Specific
Quote:
Code:
$smarty->assign("r_products",$randoms); When you look at the variable in WM, what values are assigned to $r_products? That will tell us if the URL is getting pulled from the DB or not. |
Re: Random Image or Random Products - Category Specific
Quote:
Hi Totaltec, this is what's assigned: Code:
Array (12) Looks like no URL - looking at the sql query, should it query for the productid to be able to grab it's URL map? Also, I think there's bug in the this code (random.php): Code:
if (!is_numeric($config["Modules"]["number_of_randomproducts"])) Should this be: [code] Code:
if (!is_numeric($config["Random_Products"]["number_of_randomproducts"])) |
Re: Random Image or Random Products - Category Specific
If you have the product id then you have the URL. the URL is product.php?productid={$productid} Look at the template, what is the code for the link look like?
|
Re: Random Image or Random Products - Category Specific
I'm using the exact template as provided in this thread, but a href is blank in the rendered HTML.
Code:
[random.tpl] Do we need to pass more parameters herein? and customer/main/products.tpl is the stock xcart file without any mods... |
Re: Random Image or Random Products - Category Specific
Code:
<a href="{$product.alt_url|default:$product.page_url|amp}" class="product-title">{$product.product|amp}</a> the above is the a href code from products.tpl and by changing it to (and create a new template file so not to wreck products.tmp; e.g. products_random.tpl: Code:
<a href="product.php?productid={$product.productid}" class="product-title">{$product.product|amp}</a> This now fixes the problems. One other thing is, this only display the product name (and link) and it's thumbnail, but it doesn't display the price, buy now button, etc... |
All times are GMT -8. The time now is 10:33 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.