Post by Aquarius » Fri May 28, 2010 7:30 pm

I noticed that when user puts product with options in cart, and after that action admin changes anything for that product in administration, all users loose options in theit charts.

Problem is in logic how changes to products are maid. When updating product all options are deleted and then reinserted.

To fix this problem, ID for options and walues must be remembered and sent to (gui) so that insert logic can reinsert same
things.

Another problem in connection with this one is user chart is saved after logout, and changes, so when user logins again there must be validation if product options or products does'nt exist any more they should be erased from chart.

When I fix this I will send my code

Redards :)

Newbie

Posts

Joined
Fri May 28, 2010 7:08 pm

Post by luke213 » Thu Jul 08, 2010 2:43 am

I was just wondering if any progress has been made to correct this issue?

I've been encountering the same problem on my test site and I can't go live until I get the options sections straight. I also have lost the options on products randomly(well actually it's probably not random but I haven't been able to nail down how to replicate it). I've got a custom gun holster website and all of my work is handmade with quite a few options and as a result loosing those options during the checkout portion is a game killer for this cart for me. Which is really unfortunate since I really like the software allot.

That said also thanks for all the work on this cart guys you are doing an excellent job and it is much appreciated, now if I can overcome this options problem I will be able to bring my new site/store online.

Any suggestions would be appreciated.


Luke Adams

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by Xsecrets » Thu Jul 08, 2010 5:50 am

you should never loose options during the checkout. you only loose the options if you add the item to the cart. leave for ever and the store owner goes and changes the options on the product in the meantime. I really don't see this being a big issue for many people.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by luke213 » Thu Jul 08, 2010 6:07 am

Well I understand that and I agree that wouldn't be an issue at all for me. The problem I'm having isn't that though it's another issue.

I've spent the last few hours working on this(I'm by no means a guy who understands code) but I've been trying to find out how I can replicate the issue and here's the run down of what I've got going on.

If I place an order with options for a product it goes through fine, options show in emails to me and customer. If I go into the administration area and edit that order to change anything, even shipping address etc it will dump all the options related to that order. I've found a single line of code that seems to be responsible for at least the removal of the options from the database:

store/admin/model/sale/order.php

Code: Select all

$this->db->query("DELETE FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "'");
If I pull this line of code then it stopped removing the data from the sql database but I'm really leery to keep hacking away at the code since my understanding of it is so rudimentary at best.

So I guess my question to you guys out there is, is there an easy edit to that file that will stop it from dumping the options and reload them when I view that same order again. Also is this behavior happening for anyone else?

I tried to test it on the demo account on the main site but the combination of not being able to edit the products and lack of inventory on those same products wouldn't let me test.

Any suggestions as always are appreciated.

Thanks again

Luke

EDIT: Also in re-reading the original posters issue and having a bit more understanding of the issue I note that he indeed is having a different problem and it is the one Xsecrets is referring to. If someone with powers feels it necessary to split this thread out to it's own it would be appreciated since it is a different issue.

Thanks

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by Qphoria » Thu Jul 08, 2010 8:32 am

Yes that is a known issue and mentioned in the 1.4.8 release thread. It will be fixed in 1.4.9

It should be rare that you need to edit any orders other than to update the status, and that is done with the Add History button, not the save button. The whole thing is a bit confusing because there are too many trains of thought so 1.4.9 will actually put the order page back to the way it was in 1.4.7 and the Add/Edit stuff will be done differently

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by luke213 » Thu Jul 08, 2010 9:04 am

Being that I'm new to the software I hope this isn't a stupid question but is there any serious reason that I couldn't go back to 1.4.7? I would normally just try it but I'm on a pretty limited net connection and the thought of FTP'ing all the files is making me cringe;)

If it would work though I'd be happy to go back down a version till the new one comes out. The primary reason is right now I get allot of people changing information because my business is custom work I take orders today and they don't get a product for around 9 weeks(at the moment) because of backlog, as a result I see quite a few guys who have moved or something else changed in that period. I guess I'm the odd duck in the way I'm using the cart and by far not the normal circumstance but I would appreciate any direction you could provide.

Also thanks for the response glad to hear it's not something I've caused:)

Luke

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by Qphoria » Thu Jul 08, 2010 1:20 pm

Seems pretty pointless. Admin Edit is a transparent feature ... meaning you don't need to use it. Since 1.4.7 didn't have it, there is nothing to worry about. Just don't click save.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by luke213 » Thu Jul 08, 2010 2:12 pm

Qphoria wrote:Seems pretty pointless. Admin Edit is a transparent feature ... meaning you don't need to use it. Since 1.4.7 didn't have it, there is nothing to worry about. Just don't click save.
Perhaps I'm misunderstanding some portion of the software. How can I change say a shipping address on a customer's order without going into that interface and editing? I've tried to change it via the customers interface but it doesn't seem to change on past orders. I guess maybe I just am missing some way to access that same information, also would be very nice to be able to add products with options to the existing order.

All of that said is there a commercial product/module that would allow me to add options/products after the sale? I'm not opposed to spending a small amount of money to get the cart up and running the way I envision it. I guess primarily I want this to make my life easier with the fewest number of workarounds.

I do appreciate the response just must be missing the boat on what your referring to.

Thanks

Luke
(Just re-read your post and I see that your saying editing orders wasn't available in 1.4.7, understand that. Are you saying that there is another way to edit the order?)

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by i2Paq » Thu Jul 08, 2010 2:49 pm

luke213 wrote: (Just re-read your post and I see that your saying editing orders wasn't available in 1.4.7, understand that. Are you saying that there is another way to edit the order?)
No.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Xsecrets » Thu Jul 08, 2010 10:23 pm

basically what we are saying is at this point in time you cannot do what you want. The order editor was new for 1.4.8 and it is not to put it kindly "feature rich" so one of the side effects of editing an order is that all the options are removed. This was noted in the release notes. In 1.4.9 it should be "feature improved" so that this problem doesn't exist any more. So basically you can not edit orders that have options or you can wait for the next version.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by luke213 » Fri Jul 09, 2010 12:00 am

Xsecrets wrote:basically what we are saying is at this point in time you cannot do what you want. The order editor was new for 1.4.8 and it is not to put it kindly "feature rich" so one of the side effects of editing an order is that all the options are removed. This was noted in the release notes. In 1.4.9 it should be "feature improved" so that this problem doesn't exist any more. So basically you can not edit orders that have options or you can wait for the next version.
Well that makes sense, I must have missed it when I browsed through the release notes or didn't realize what I was reading since I hadn't run the software much and wouldn't have clicked the way it would now. I guess I will just have to work around that issue until the new release comes out.

Thanks allot guys I appreciate the responses for a new guy trying to get all the ducks in a row.

Take care!

Luke

New member

Posts

Joined
Thu Jul 08, 2010 2:35 am


Post by Johnathan » Sat Jul 17, 2010 4:02 am

If you know how to edit MySQL databases, you could probably edit orders in 1.4.7 through phpMyAdmin, but it would be a pain.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by laerte » Wed Aug 25, 2010 2:22 pm

Yes that is a known issue and mentioned in the 1.4.8 release thread. It will be fixed in 1.4.9
1.4.9 RC2 doesn't have this "feature" to change prices or quantities n total. Maybe to correct something. QuickCart, has this "feature" too. I think this: if you are the administrator, should have "total control", right? :)

Well, if I think right... Maybe then this option could still be active, or else to keep an "editable" w/ a click, as is done in flickr: to edit a photo captions, for example, just need to click. And u guys what u think?

Newbie

Posts

Joined
Fri Aug 20, 2010 7:14 pm

Post by laerte » Wed Aug 25, 2010 3:32 pm

Anybody know how to keep at least this options (v1.4.8) if I update order?

I tried comment the line as luke213 said:
this->db->query("DELETE FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order
but isn't working.

Newbie

Posts

Joined
Fri Aug 20, 2010 7:14 pm

Post by vlado » Thu Mar 10, 2011 2:38 am

Qphoria wrote:Yes that is a known issue and mentioned in the 1.4.8 release thread. It will be fixed in 1.4.9

It should be rare that you need to edit any orders other than to update the status, and that is done with the Add History button, not the save button. The whole thing is a bit confusing because there are too many trains of thought so 1.4.9 will actually put the order page back to the way it was in 1.4.7 and the Add/Edit stuff will be done differently
i also have a problem, that if the order status is updated (with the add history button), the product options disapear...

ok, i understand that this is an issue in 1.4.8, however i´d like to know if there is any workaround possible to be done in 1.4.8 (some code change), because for me upgrade to a newer version is not possible (too many extensions installed an many other changes done already in the code). can you at least point me to the file/section which is causing this issue please?

Newbie

Posts

Joined
Thu Mar 10, 2011 2:29 am

Post by superann » Sun Jul 03, 2011 3:33 am

Is the original issue (product options being lost on product update) ever going to be fixed? I just checked the latest (1.5.0) source and this bug still persists. It is causing lots of orders to come through without options on a high traffic site where products are regularly updated (certain attributes such as inventory have to be constantly kept up-to-date). Changes to be made should incorporate modifying the editProduct function in admin/model/catalog/product.php to exclude deleting options that remain the same (as described by OP) as well as modifying the cart getProducts function in system/library/cart.php to remove products that are no longer available in that option (should probably also trigger the output of a message ie. "one or more products that are no longer available in your chosen option have been removed from your cart").

If this isn't on the to-do list, I'd be happy to do it myself and contribute my solution to the core.

New member

Posts

Joined
Mon Sep 07, 2009 9:59 am


Post by Daniel » Sun Jul 03, 2011 7:04 pm

superann wrote:Is the original issue (product options being lost on product update) ever going to be fixed? I just checked the latest (1.5.0) source and this bug still persists. It is causing lots of orders to come through without options on a high traffic site where products are regularly updated (certain attributes such as inventory have to be constantly kept up-to-date). Changes to be made should incorporate modifying the editProduct function in admin/model/catalog/product.php to exclude deleting options that remain the same (as described by OP) as well as modifying the cart getProducts function in system/library/cart.php to remove products that are no longer available in that option (should probably also trigger the output of a message ie. "one or more products that are no longer available in your chosen option have been removed from your cart").

If this isn't on the to-do list, I'd be happy to do it myself and contribute my solution to the core.
it was fixed in the 1.5.0

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Qphoria » Mon Jul 11, 2011 7:26 pm

superann wrote:Is the original issue (product options being lost on product update) ever going to be fixed? I just checked the latest (1.5.0) source and this bug still persists. It is causing lots of orders to come through without options on a high traffic site where products are regularly updated (certain attributes such as inventory have to be constantly kept up-to-date). Changes to be made should incorporate modifying the editProduct function in admin/model/catalog/product.php to exclude deleting options that remain the same (as described by OP) as well as modifying the cart getProducts function in system/library/cart.php to remove products that are no longer available in that option (should probably also trigger the output of a message ie. "one or more products that are no longer available in your chosen option have been removed from your cart").

If this isn't on the to-do list, I'd be happy to do it myself and contribute my solution to the core.
Also fixed in 1.4.9.5 (in a different way)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by superann » Wed Jul 13, 2011 5:03 am

Ah... I guess you guys changed up the options schema in these latest versions. Will have to do a diff and figure things out at some point. Thanks for the reply!

New member

Posts

Joined
Mon Sep 07, 2009 9:59 am


Post by Xsecrets » Wed Jul 13, 2011 6:16 am

superann wrote:Ah... I guess you guys changed up the options schema in these latest versions. Will have to do a diff and figure things out at some point. Thanks for the reply!
yes the options schema is very different in the new version. They moved from product based options to global options.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US
Who is online

Users browsing this forum: No registered users and 151 guests