Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Display Product Prices not Variant Prices on products page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 12-25-2008, 09:39 PM
 
zingodingo zingodingo is offline
 

Member
  
Join Date: Sep 2006
Posts: 20
 

Default Re: Display Product Prices not Variant Prices on products page

Quote:
Originally Posted by Jon
In include/search.php

FIND:

Code:
if($products[$k]['descr'] == strip_tags($products[$k]['descr'])) $products[$k]['descr'] = str_replace("\n"," ",$products[$k]['descr']); if($products[$k]['fulldescr'] == strip_tags($products[$k]['fulldescr'])) $products[$k]['fulldescr'] = str_replace("\n"," ",$products[$k]['fulldescr']);

After put:

Code:
$tempid = $products[$k]['productid']; $maxprice = func_query_first("SELECT price FROM $sql_tbl[pricing] WHERE quantity='1' AND productid='$tempid' AND membership=''"); if ($maxprice[price] > 0) { $products[$k]['maxprice'] = $maxprice[price]; } else { $products[$k]['maxprice'] = $products[$k]['price']; }

Then use $products[whatever].maxprice in your templates.

I can not make it work. I have following error. please help.
NVALID SQL: 1054 : Unknown column 'membership' in 'where clause'
SQL QUERY FAILURE:SELECT price FROM xcart_pricing WHERE quantity='1' AND productid='240' AND membership=''
__________________
www.GrandTea.com
Chinese Tea Shop

Business 5.3.1.6


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020