X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Display Product Prices not Variant Prices on products page (https://forum.x-cart.com/showthread.php?t=16560)

zingodingo 12-25-2008 09:39 PM

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=''


All times are GMT -8. The time now is 08:43 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.