View Single Post
  #50  
Old 10-24-2012, 05:19 PM
 
franki franki is offline
 

Member
  
Join Date: Aug 2005
Posts: 13
 

Default Re: Random Image or Random Products - Category Specific

Quote:
Originally Posted by totaltec
Take a look at webmaster mode. See the smarty assign in random.php?
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.

Hi Totaltec, this is what's assigned:
Code:
Array (12) 0 => Array (22) productid => "525" provider => "1" productcode => "SKUFOR9" avail => "2" min_amount => "1" list_price => "20.03" distribution => "" product => "XYZ (product name)" price => 10 variantid => "0" weight => "0.13" is_product_options => "" is_variant => "" taxid => "1" taxed_price => "11.00" tmbn_url => "http://www.example.com/image..." image_x => "40" image_y => "150" tmbn_x => "40" tmbn_y => "150" price_deducted_tax => "Y" taxes => Array (1) GST => Array (16) taxid => "1" tax_name => "GST" formula => "DST+SH" address_type => "S" active => "Y" price_includes_tax => "Y" display_including_tax => "Y" display_info => "" regnumber => "" priority => "0" rate_value => 10 rate_type => "%" tax_display_name => "GST" tax_value_precise => 1 tax_value => 1 taxed_price => 11

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"])) $config["Modules"]["number_of_randomproducts"] = 0;

Should this be:
[code]

Code:
if (!is_numeric($config["Random_Products"]["number_of_randomproducts"])) $config["Random_Products"]["number_of_randomproducts"] = 0;
?
__________________
Version: 4.5.x
Reply With Quote