This is a discussion on Missing DB entry? for Printable Catalog with discounts within the osCMax/osCommerce forums, part of the Virtual Hosting Forums category; I'm running into an error with the printable catalog feature when it calls for the customers discount level (group discount). ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I'm running into an error with the printable catalog feature when it calls for the customers discount level (group discount). If I disable in the admin it's fine, but I want wholesale customers to be able to print a wholesale price list so I enabled the feature. This is the error: Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/csmqwfch/public_html/catalog/templates/aabox/content/catalog_products_with_images.tpl.php on line 300 and it deals with this code: //Discount used for Customer Discount Mod if (PRODUCT_LIST_CUSTOMER_DISCOUNT) { $discount = mysql_result(mysql_query("select customer_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"), 0 , 0); } The problem seems to be the reference table entry from TABLE_CUSTOMERS based on the CUSTOMERS_ID where it is looking for a discount. I don't know squat about code but it seems the TABLE is missing an entry or direction set to extrapolate the discount. The PRODUCTS_GROUPS entry has the correct discounted price attributed to the correct group but the Printable Catalog fails to retreive it. Any suggestions? I would really love to use this feature as a large part of our business will be wholesale. Thanks |