Author Topic: Random with desc  (Read 1267 times)


  • Guest
Random with desc
« on: August 03, 2010, 16:46:14 pm »
Hi all!
I'm working on my new site and i'm using virtuemart.
I want to have on my frontpage some random products with short description.
I've done this and this works, but the problem is that i've published latest_products module on my site, and in this module i don't want to display the short description, just the name, price and the thumb image...but with the settings mentionated above this module is changing as well..

Beside this, I've tryed something else...
in the second sql interogation, so i've obteined this:
Code: [Select]
else {
   $q  = "SELECT DISTINCT product_sku, product_s_desc FROM #__{vm}_product WHERE ";
   $q .= "product_parent_id='' AND vendor_id='".$_SESSION['ps_vendor_id']."' ";
   $q .= "AND #__{vm}_product.product_publish='Y' ";
      $q .= " AND product_in_stock > 0 ";
   $q .= "ORDER BY product_name DESC";
Code: [Select]
$product_s_desc = $db->f('product_s_desc'); before the "if($db->num_rows() == 0) {" code

After all this i've added
Code: [Select]
echo $product_s_desc where i wanted to show the short description.
It works, but the problem is that i have the same short description to all my random products ..i guess it's missing something in the code..


  • Jr. Member
  • **
  • Posts: 323
Re: Random with desc
« Reply #1 on: March 10, 2011, 11:42:15 am »
did you fix that?