Lennerd Posted September 6, 2011 Share Posted September 6, 2011 I modified the V3.00b version to work with OSCommerce version 2.3.1 . I Included language files in French (as it was within V3.00b) and Dutch (translated from the French one). New download link can be found here: http://addons.oscommerce.com/info/8147 As stated on that link, my PHP knowledge ain't that good, so giving support will be difficult (as I was lucky and got it working spot on). Quote Link to comment Share on other sites More sharing options...
clippers Posted June 6, 2012 Share Posted June 6, 2012 Hi i have this mod for the 2.3.1 shop (the http://addons.oscommerce.com/info/8147 Contribution) and it works lovely except, it is not saving the cost price when i reopen edit product, it does however stay there if i dont touch the product, but now and again i have to edit the description and then it just disapears and i have to insert it again. Any ideas ? Thank you x Quote Link to comment Share on other sites More sharing options...
Cyperis Posted June 30, 2012 Share Posted June 30, 2012 @@clippers I am currently looking for something like this, the add ons that I found were the one you found: http://addons.oscommerce.com/info/1594/v,22 and another that has the cost and margins mod http://addons.oscommerce.com/info/6242 but I could not get this one to work with 2.3.1. I am looking to get this added and then get it to work with Easy Populate? Have you had any more luck with yours Quote Link to comment Share on other sites More sharing options...
clippers Posted July 9, 2012 Share Posted July 9, 2012 @@EchoGuns i havent got it fixed yet, but i dont use easy populate, i have ajax attributes and qtpro, i think it has to be some thing simple such as its not being saved to the database when opened, have you had any luck yet? Quote Link to comment Share on other sites More sharing options...
♥14steve14 Posted July 9, 2012 Share Posted July 9, 2012 If your data is not being remembered from the data base you may have missed a bit of code in the admin categories somewhere. Make sure you have added products_cost, after or before products_price. There are also a few instances where you have to add p.products_cost, after p.products_price, And also check that you have again added 'products_cost' => '', after 'products_price' => '', in the if ($action == 'new_product') { Also make sure that you have added the sql file code. clippers 1 Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
clippers Posted July 9, 2012 Share Posted July 9, 2012 (edited) hi 14steve14 thats what i did :-) I missed out one p.products_cost, after installing Header Tags SEO and editing $product_query = tep_db_query, All fixed now thank goodness, lol sometimes you have to stand back if the code goes all burry the contribution works lovely now thank you Edited July 9, 2012 by clippers Quote Link to comment Share on other sites More sharing options...
nobusiness Posted February 22, 2013 Share Posted February 22, 2013 Hi, I've downloaded the v3 version and after installing, my local taxes are not being added to my customer orders. I've looked at all the changes and I cannot see what it is that would cause it to not show during checkout or on the invoice. My taxes are based on the state of NC in the USA. If anyone has ideas, I'd love to hear them since I've had to back charge customers for taxes not taken out which is not good for business. :mellow: Thanks! - Steve Quote Link to comment Share on other sites More sharing options...
Guitarrisimo Posted March 15, 2013 Share Posted March 15, 2013 OSCommerce 2.3.3 / Margin Report v3.00 I got the wwrong cost and margin % on the admin report page, every time I changed the cost or price for a product it changed the report. I did the following and it worked. Line 223 margin_report2.php $prods_query = mysql_query("select op.products_id, op.products_price, op.products_quantity, p.products_cost from orders_products op, products p where op.orders_id = '" . $o[$i] . "' and op.products_id = p.products_id"); change to $prods_query = mysql_query("select op.products_id, op.products_price, op.products_quantity, op.products_cost from orders_products op, products p where op.orders_id = '" . $o[$i] . "' and op.products_id = p.products_id"); Quote Link to comment Share on other sites More sharing options...
misfitsbodypiercing Posted October 16, 2013 Share Posted October 16, 2013 Hi Can anyone help. I'm getting the following message when i click on 'reviews' Warning: array_merge(): Argument #3 is not an array in /customers/9/2/d/misfitsbodypiercing.co.uk/httpd.www/catalog/admin/reviews.php on line 222 Warning: reset() expects parameter 1 to be array, null given in /customers/9/2/d/misfitsbodypiercing.co.uk/httpd.www/catalog/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /customers/9/2/d/misfitsbodypiercing.co.uk/httpd.www/catalog/admin/includes/classes/object_info.php on line 18 Quote Link to comment Share on other sites More sharing options...
Bob Terveuren Posted October 17, 2013 Share Posted October 17, 2013 Hi line 222 in reviews.php is $rInfo_array = array_merge($reviews, $review_info, $products_image) Error is telling you that $ products_image is not an array so maybe the lines above $products_image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$reviews['products_id'] . "'"); $products_image = tep_db_fetch_array($products_image_query); are not getting a result (maybe a product with no image?) Quote Link to comment Share on other sites More sharing options...
toughmama Posted March 31, 2014 Share Posted March 31, 2014 (edited) Hi, Anyone ever get this error... happens when I click on drop down bar. (daily, yesterday, etc) Warning: mysql_query() [function.mysql-query]: Access denied for user 'tntsale3'@'localhost' (using password: NO) in /home/tntsale3/public_html/shop/office/margin_report2.php on line 34 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/tntsale3/public_html/shop/office/margin_report2.php on line 34 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/tntsale3/public_html/shop/office/margin_report2.php on line 35 and more.... OScom 2.3.4 with QPBPP for SPPC Edited March 31, 2014 by toughmama Quote Link to comment Share on other sites More sharing options...
toughmama Posted March 31, 2014 Share Posted March 31, 2014 Problem solved... running 2.3.4 - - need to change query in margin_report2.php mysql_query to ==> tep_db_query mysql_fetch_array to ==> tep_db_fetch_array Thanks to George @ Mini Template System for solving this problem. Quote Link to comment Share on other sites More sharing options...
toughmama Posted April 2, 2014 Share Posted April 2, 2014 Re. Duplicate products because some some product are listed/linked to different categories Here is a fix for the margin_report.php to have single product listing. -------------------------------------- Line 142 if (strpos($this->sql_query, 'distinct') || strpos($this->sql_query, 'group by')) { //$count_string = 'distinct ' . tep_db_input($count_key); $count_string = tep_db_input($count_key); } else { $count_string = tep_db_input($count_key); } ============= Line 405 - change to: $listing_sql = "select p.products_id, p.products_price as products_price, p.products_cost, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_price, if(s.status, s.specials_new_products_price-p.products_cost, p.products_price-p.products_cost) as margin_dollars, if(s.status, (s.specials_new_products_price-p.products_cost)/s.specials_new_products_price*100, (p.products_price-p.products_cost)/p.products_price*100) as margin_percentage from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"; ============= Line 416 - change to: $listing_sql = "select distinct p.products_id, p.products_price as products_price, p.products_cost, pd.products_name, IF(s.status, s.specials_new_products_price, NULL) as specials_price, if(s.status, s.specials_new_products_price-p.products_cost, p.products_price-p.products_cost) as margin_dollars, if(s.status, (s.specials_new_products_price-p.products_cost)/s.specials_new_products_price*100, (p.products_price-p.products_cost)/p.products_price*100) as margin_percentage from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id"; Quote Link to comment Share on other sites More sharing options...
Roaddoctor Posted April 20, 2014 Share Posted April 20, 2014 Could someone please verify if these instructions are correct? Should products_cost be in the $product_query? just seemed odd that its not, so wanted to check /catalog/includes/classes/shopping_cart.php Find: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; Replace With: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_cost = $product['products_cost']; $products_weight = $product['products_weight']; Quote -Dave Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.