blueline Posted November 21, 2004 Author Share Posted November 21, 2004 Unforunately the report doesn't accomidate for attributes. This is something that I think will have to come in the next version. Quote Chris Sullivan Link to comment Share on other sites More sharing options...
gscreations Posted November 23, 2004 Share Posted November 23, 2004 hi ive installed the margin report.(latest version)  all works ok, apart from index/categories.php  i get this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/skycards/skycards.net/admin/includes/functions/database.php on line 99  when i revert back to original page i dont get the error.  Any know why this happens??? Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted November 24, 2004 Share Posted November 24, 2004 I'm having a problem with Margin Reports transferring the product cost over into the orders table. It doesn't want to move it when an order is made, thus making all orders look like pure profit. Any ideas? As of right now I have to constantly go into my database and manually enter the product costs to show accurate reports. Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted November 28, 2004 Share Posted November 28, 2004 Doesn't anyone even look at this thread anymore??? I find it rather important that Margin Reports doesn't do what it's supposed to. Quote Link to comment Share on other sites More sharing options...
greg334 Posted November 28, 2004 Share Posted November 28, 2004 Yes I look at it, and what doesn't it do? it works good for me.  Doesn't anyone even look at this thread anymore??? I find it rather important that Margin Reports doesn't do what it's supposed to. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted December 3, 2004 Share Posted December 3, 2004 Yes I look at it, and what doesn't it do? it works good for me. <{POST_SNAPBACK}> Â In my previous thread I stated that it's not transferring the products cost into the orders table when something is purchased, therefore showing all items as costing $0.00 when I run a report. And yes I did enter the costs of the products when I created them in the catalog. Quote Link to comment Share on other sites More sharing options...
blueline Posted December 3, 2004 Author Share Posted December 3, 2004 Check your database to ensure that the cost values are actually in the db. That would be the first step to troubleshooting this problem. Quote Chris Sullivan Link to comment Share on other sites More sharing options...
cdi-buy.com Posted December 3, 2004 Share Posted December 3, 2004 Check your database to ensure that the cost values are actually in the db. That would be the first step to troubleshooting this problem. <{POST_SNAPBACK}> Â They're in the products table - they just aren't being moved over to the orders_products table when a sale is created. Quote Link to comment Share on other sites More sharing options...
JohnnyGTO Posted December 9, 2004 Share Posted December 9, 2004 I have re-installed 2.56 and still get  1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #29' at line 1  Resource id #29  [TEP STOP]  when I select a Manufacture and then do a All Catagories by Manufacture. Otherwise the other reports work. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2004 Share Posted December 18, 2004 (edited) I've got a couple of issues I could use some help with. Â 1. In margin_report2, I have this on line 134: Â while ($prods = mysql_fetch_array($prods_query, MYSQL_ASSOC)) { Â If I don't comment it out, I get the following error: Â Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/baddogse/public_html/catalog/admin/margin_report2.php on line 134 Â 2. When I select a report (like daily, weekley, etc.), I get nothing but zeros. Â 3. When I try to export, I get stuff like <table width="1050" border="1" cellspacing="0" cellpadding="2"> in the spreadsheet but no report. Â Suggestions as to what to look at/for would be appreciated, especially if you've had similar problems and fixed them. Edited December 18, 2004 by baddog Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted December 19, 2004 Share Posted December 19, 2004 I'm still having issues with the products costs being inserted into the orders_products table when an order is generated. No answers yet makes me think this board has been abandoned. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 19, 2004 Share Posted December 19, 2004 I'm still having issues with the products costs being inserted into the orders_products table when an order is generated. No answers yet makes me think this board has been abandoned. <{POST_SNAPBACK}> I took the front end stuff (the changes to /includes/classes/order.php and shopping cart.php and /checkout_process.php) out after finding out that if a customer tried to check out, they got an error page after clicking on the confirm button. At the same time, I would get the money and an order would be recorded, but no products were in the order so I couldn't tell what had been ordered and in order history it showed a blank order. I didn't want to screw around with it since the store is live. I can still use some of the back end stuff (I also dropped the reports that didn't work and the export feature, since I couldn't get that to work either). I guess I still like what is left and it is useful, just not as good as if I could get all of the features working. Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted December 20, 2004 Share Posted December 20, 2004 I took the front end stuff (the changes to /includes/classes/order.php and shopping cart.php and /checkout_process.php) out after finding out that if a customer tried to check out, they got an error page after clicking on the confirm button. At the same time, I would get the money and an order would be recorded, but no products were in the order so I couldn't tell what had been ordered and in order history it showed a blank order. I didn't want to screw around with it since the store is live. I can still use some of the back end stuff (I also dropped the reports that didn't work and the export feature, since I couldn't get that to work either). I guess I still like what is left and it is useful, just not as good as if I could get all of the features working. <{POST_SNAPBACK}>  I must be doing good then because the only thing I cant get to work is what I stated before. I have to go into the database through phpMyAdmin and add the products_cost data after-the-fact. It's not incredibly bad but it can be a pain since accessing the database like that is rather annoying. Quote Link to comment Share on other sites More sharing options...
dblake Posted December 29, 2004 Share Posted December 29, 2004 I just installed this 10 mins ago and everything works fine for me. There was 2 or 3 places in the directions that I believe were left out.  On the shopping cart page  The two places it tells you to add  $products_cost = $product['products_cost'];  'cost' => $products['products_cost'],  It didn't tell you to add the products_cost, to the query. It also does this on the order.php page. So just add that in the query and you should cure your problem of the cost not showing up for your reports. Make sure the directions didn't leave any other places out like that as I corrected them as I went and the reports works fine for me. Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted December 30, 2004 Share Posted December 30, 2004 I just installed this 10 mins ago and everything works fine for me. There was 2 or 3 places in the directions that I believe were left out. On the shopping cart page  The two places it tells you to add  $products_cost = $product['products_cost'];  'cost' => $products['products_cost'],  It didn't tell you to add the products_cost, to the query. It also does this on the order.php page. So just add that in the query and you should cure your problem of the cost not showing up for your reports. Make sure the directions didn't leave any other places out like that as I corrected them as I went and the reports works fine for me. <{POST_SNAPBACK}>  Hey thanks....that was the cause of the problem. That single lack of a db query. I should have known better myself :wacko: Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted January 4, 2005 Share Posted January 4, 2005 Ok I was wrong. It works with Money Order payments now but not PayPal. Quote Link to comment Share on other sites More sharing options...
WebPixie Posted January 7, 2005 Share Posted January 7, 2005 Ok I was wrong. It works with Money Order payments now but not PayPal. <{POST_SNAPBACK}>  What is it "not" doing with paypal? Not putting the price in the table? Paypal ipn is a whole other beast, I've had to tweak mine for 3 other mods I installed.... other payment systems work, but paypal is a pain. Quote Link to comment Share on other sites More sharing options...
WebPixie Posted January 9, 2005 Share Posted January 9, 2005 (edited) What is it "not" doing with paypal? Not putting the price in the table? Paypal ipn is a whole other beast, I've had to tweak mine for 3 other mods I installed.... other payment systems work, but paypal is a pain. <{POST_SNAPBACK}> Â Â If you are using paypal you need to add this for the margin report to record the cost for a paypal sale. Â in includes/modules/payment/paypal_ipn.php Find: ? ? ? ? ? ?$sql_data_array = array('orders_id' => $insert_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_id' => tep_get_prid($order->products[$i]['id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_model' => $order->products[$i]['model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_name' => $order->products[$i]['name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => $order->products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $order->products[$i]['final_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_tax' => $order->products[$i]['tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_quantity' => $order->products[$i]['qty']); Â And Make it this: Â ? ? ? ? ? ?$sql_data_array = array('orders_id' => $insert_id, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_id' => tep_get_prid($order->products[$i]['id']), ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_model' => $order->products[$i]['model'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_name' => $order->products[$i]['name'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => $order->products[$i]['price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_cost' => $order->products[$i]['cost'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'final_price' => $order->products[$i]['final_price'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_tax' => $order->products[$i]['tax'], ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_quantity' => $order->products[$i]['qty']); Â Â Works perfectly now :) Â Hope that helps someone. Â WebPixie Edited January 9, 2005 by WebPixie Quote Link to comment Share on other sites More sharing options...
cdi-buy.com Posted January 27, 2005 Share Posted January 27, 2005 If you are using paypal you need to add this for the margin report to record the cost for a paypal sale. in includes/modules/payment/paypal_ipn.php Find:       $sql_data_array = array('orders_id' => $insert_id,                   'products_id' => tep_get_prid($order->products[$i]['id']),                   'products_model' => $order->products[$i]['model'],                   'products_name' => $order->products[$i]['name'],                   'products_price' => $order->products[$i]['price'],                   'final_price' => $order->products[$i]['final_price'],                   'products_tax' => $order->products[$i]['tax'],                   'products_quantity' => $order->products[$i]['qty']);  And Make it this:        $sql_data_array = array('orders_id' => $insert_id,                   'products_id' => tep_get_prid($order->products[$i]['id']),                   'products_model' => $order->products[$i]['model'],                   'products_name' => $order->products[$i]['name'],                   'products_price' => $order->products[$i]['price'],                   'products_cost' => $order->products[$i]['cost'],                   'final_price' => $order->products[$i]['final_price'],                   'products_tax' => $order->products[$i]['tax'],                   'products_quantity' => $order->products[$i]['qty']); Works perfectly now :)  Hope that helps someone.  WebPixie <{POST_SNAPBACK}>   I must have a different version of the PayPal IPN...mine's Greg Baloolal's Version 2.3...works fine so I don't plan to upgrade anytime soon unless I build a fresh store. Quote Link to comment Share on other sites More sharing options...
thpek Posted January 28, 2005 Share Posted January 28, 2005 HI, a great contribution and very useful to me. However I have problems getting it to work with Osc2.2 installed with ACA. The margin report works fine but the shop is not now. After placing orders, when customer checkout, it shows blank screen and when customer review their order also blank screen. May have more problem. Just a few I notice. Possible to advise how to integrate your MOD to ACA? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
thpek Posted January 28, 2005 Share Posted January 28, 2005 Hi, additional notes to my problem in the last posting. As mention in the posting above who have the same problem as mine, have to revert the /include/classes/order.php & shopping_cart.php (means without changes as of margin report installation) and /checing_process.php files back to before to resolve this problem. Wonder what difference can we see/impact if we did/didn't follow the instructions to include the changes as per margin report installation notes. Thanks for advise. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 29, 2005 Share Posted January 29, 2005 I finished with the installation of this contrib but when I try to access Categories from Administrator Panel, I get:  1054 - Unknown column 'p.products_cost' in 'field list'  select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_cost, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from products p, products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '21' order by pd.products_name  [TEP STOP]  Could someone advice what I did wrong please? Quote Link to comment Share on other sites More sharing options...
dblake Posted January 29, 2005 Share Posted January 29, 2005 U didnt add your products_cost field in the database. You didnt run the sql statement that came with the contribution. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 30, 2005 Share Posted January 30, 2005 Thank you! Quote Link to comment Share on other sites More sharing options...
NeedleJack Posted February 26, 2005 Share Posted February 26, 2005 Attributes? Is this in the works or has this feature been abandoned? This is probably the most frustrating part about such a great contribution. It's like having a ferrari without the wheels. How many of us use attributes on our store? I for one have em on just about every product. Therefore this contribution cannot accurately give a correct profit based off of this one detail that seems to have been overlooked during the design process. Â Has anyone else been able to come up with a fix for this? If so - could you please update the contribution and post it for the rest of us. I'm not a programming junkie - just a little here and there. So, obviously a change of this magnitude is beyond my comprehension. For all I know it may not even ever be able to do this. Any guidance would be appreciated. Â Sincerely, Christopher Caruso Quote 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.