Post by eire » Sat Jun 06, 2015 4:10 am

Hi,
I have been having an issue where on certain orders, products that have options are missing their product options in the order. The lowest price is then charged and the product is listed as a standard product without any options. I've looked at the last 4 or 5 orders that this has happened to and I think I can see a pattern. For every order who this happened to, the customer created an account a couple of days/weeks previous to the day the order and they added products with options then. A few weeks later they then go to place the order with the saved products and sometimes a couple extra and the issue occurs. I'm thinking the issue is occurring when the products are getting saved to the cart in the cart column of the customer table or when it's being read again.

I'm looking for someone to help fix this issue. Please let me know if you think you can solve this and are available.

Thanks,
Philip

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by D3MO » Sat Jun 06, 2015 5:33 am

you mean when users leave items in cart and later returns and buys it?

Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by eire » Sat Jun 06, 2015 5:47 am

Exactly

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by D3MO » Sat Jun 06, 2015 5:48 am

what version of the opencart? also question haven't you modified the options in admin? deleted?added new ones?

Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by eire » Sat Jun 06, 2015 6:00 am

Hi,
OC1.5.5.1
I'm using the CSV Product Import extension from Karapuz and when I modify anything it is in there. I do go in and delete options that need to be deleted but for the orders that had this issue, no update was made to the options. I am using a couple of extensions from Qphoria: options_price_update_redux.xml, show_full_option_price.xml

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by D3MO » Sat Jun 06, 2015 6:05 am

eire wrote:Hi,
OC1.5.5.1
I'm using the CSV Product Import extension from Karapuz and when I modify anything it is in there. I do go in and delete options that need to be deleted but for the orders that had this issue, no update was made to the options. I am using a couple of extensions from Qphoria: options_price_update_redux.xml, show_full_option_price.xml


so you have answered your question yourself. you go and delete old options adding new options so i believe this will be the issue, have you tested it without updating your products ?

Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by eire » Sat Jun 06, 2015 6:10 am

D3MO wrote: so you have answered your question yourself. you go and delete old options adding new options so i believe this will be the issue, have you tested it without updating your products ?
Hi,
I delete some options on certain products every now and then but I have not deleted any options on any of the affected products (the products that are in the orders with the missing product options)

Thanks

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by D3MO » Sat Jun 06, 2015 7:34 am

i mean do you modify the options not in a products itself but in the admin section of the options itself

Opencart Expert | voldemaras@gmail.com
Skype - programanija | Gtalk - voldemaras@gmail.com
Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by eire » Sat Jun 06, 2015 7:47 am

No, no modification of the actual product options

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by JAY6390 » Sat Jun 06, 2015 8:02 am

You don't need to modify the options for this to happen. Simply editing a product will do this. This is because each time you save your products, the options are wiped, and re-made in the database - deleting the old option id and replacing it with a new one. This has been a bug for years now and is still happening in 2.0. You can reproduce this pretty simply. Add a product with options to your basket, then go to your admin and click edit next to the product. Click the save button without making any changes to the product. Refresh your cart and the options disappear. This happens to customers if you're editing while they're using the site, not just from old saved carts

For OC 1.5 I built an extension called Live options. This basically edits the options in real time, but doesn't delete them and re-generate them. It also leaves them unaffected when you save products. This will not work however with any import extension, as those work outside the normal functionality. If you need the import of products, the only choice you have is to delete products from the customers cart if they have options that don't exist any more selected

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by eire » Sat Jun 06, 2015 8:21 am

JAY6390 wrote:You don't need to modify the options for this to happen. Simply editing a product will do this. This is because each time you save your products, the options are wiped, and re-made in the database - deleting the old option id and replacing it with a new one. This has been a bug for years now and is still happening in 2.0. You can reproduce this pretty simply. Add a product with options to your basket, then go to your admin and click edit next to the product. Click the save button without making any changes to the product. Refresh your cart and the options disappear. This happens to customers if you're editing while they're using the site, not just from old saved carts

For OC 1.5 I built an extension called Live options. This basically edits the options in real time, but doesn't delete them and re-generate them. It also leaves them unaffected when you save products. This will not work however with any import extension, as those work outside the normal functionality. If you need the import of products, the only choice you have is to delete products from the customers cart if they have options that don't exist any more selected
Jay,
You are an absolute legend! That's exactly it, I just tested it. I had some products with options in my cart, logged out and the products with options were saved correctly. As soon as I ran an import, the options were wiped. PM me your PayPal email and I'll buy you a few pints.

How do I go about solving this as I have to run the importer to update the stock levels. Is it possible to disable the saving of products to cart? Does this also affect wishlists?

Many thanks for this info, my head was wrecked. This should be very helpful for anybody who is searching about this issue in future.

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by JAY6390 » Sat Jun 06, 2015 8:28 am

Hi Phillip

Never ask for donations for my posts on the forums - it'll help others as well as yourself. If you want to send a few £€$, get something out of it yourself and buy one of my extensions from the extension store - See my signature for a link to them all

For the import, is it just stock values for the product, or the options too? If it's just the product, you can almost certainly do that without needing to wipe the database values for options. If its options too, thats more tricky but could be done in theory

Kind regards
Jay

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by eire » Sat Jun 06, 2015 8:37 am

Hi Jay,
I have 7 of your extensions already but would still like to donate something. You've no idea how much heartache this caused me. I'm glad it's available for others now as I'm sure this is something that would be useful. I will also purchase extensions from you where possible in future.

Both product quantity and option quantity are updated in the importer I'm afraid. I'm using Karapuz's CSV importer and it's great for us. It's generally just the stock counts that gets updated but obviously prices are updated every couple of months and options are added/deleted from time to time.

What do you think is a possible workaround?
  • Is it possible to switch off the products being save upon logout?
    Do you have a mod available?
    Should I ask Karapuz about a mod?
Thanks for your help!

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by JAY6390 » Sat Jun 06, 2015 8:46 am

Ah, you're one of my best customers already then! :laugh:

The easiest solution to me would be to modify the importer you have now so that it only updates values, and doesn't add/delete options/products if they're missing for example. Having not used the extension by Karapuz, I can't say how easy this would be but shouldn't require more than an hours work I wouldn't have thought. If that's not really an option, the alternative would be to have one built (2 - 3 hours work at a guess for any half-decent programmer)

Not entirely sure what you mean regarding the logout not saving, but that wouldn't solve the issue for those that are using the site when you are importing. If you mean when the customer logs out all of their basket is simply gone, then yes you could certainly do that - though I'd recommend stopping the default behaviour for when this happens of also wiping the basket on the site for the user, as they may do so by accident and lose everything they were buying. Pretty sure many people in that predicament would give up if that happened to them after they'd spent some time doing it

Kind regards
Jay

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by eire » Sat Jun 06, 2015 8:56 am

You're software is really good and helps speed up my tasks quite a bit.

If I chose your option of only updating values, that wouldn't work I'm afraid as I use the importer 95% of the time for updating stock counts and 5% of the time for adding new products including products with options so I would need that functionality :(

That is what I meant about logging out that the products in their cart wasn't saved. As you say though, this could also lead to a higher rate of cart abandonment.

I can't believe I haven't seen this issue before or heard of it. Surely it's quite common, do you come across it often? I'm lost as to what to do. Would your live options work at all with this even if it was modified?

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by JAY6390 » Sat Jun 06, 2015 9:06 am

Seen it plenty of times, but very few people that run stores will actually notice it. The main reason they won't is they're not shopping on the site while its happening. My live options is only a fix for the product editing under CATALOG > PRODUCTS. Its not something that could be fixed in imports.

For me, the best solution in your scenario would be to get your importer modified to update if there is an ID associated with an item, or add/delete if it doesn't or isn't present. Thats going to be a bit more technical than the original suggestion of pure updates, but would prevent the issue entirely.

However, assuming you do your new product imports when your site is quite, you could mix a combination of live options, your standard importer and your suggestion for not saving customer carts to the database (so once they close the browser it goes, but doesn't when they log out). This would largely limit people having their items go missing

Kind regards
Jay

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by eire » Sat Jun 06, 2015 9:20 am

It's seems like madness to me that something like this hasn't been addressed within the core infrastructure of OC. Is it particularly hard to fix/solve?

Just so I'm 100% (sorry to keep on with this), what could be a solution is:
modify the importer to do the following:
if the product has options and that option is associated with a cart (customer.cart)
- update the values
if the product has options and the option isn't associated then carry on as normal (add/delete option - create new option id)

In the above scenario, what about if I want to add a new option (larger size bed) to a product but that product has an option that is associated with a cart and that user has forgotten about it, it would still add the new product wouldn't it as it's a new product id?

Then, I don't need to worry about removing/not saving products in customer's cart who close the browser or logout, right?

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by JAY6390 » Sat Jun 06, 2015 9:35 am

Yeah its a little irresponsible that this is still going on, but the powers that be have decided its not important :crazy:
That said, yeah its not a simple fix but its not a huge issue either, and as you can see from my extension live options it can be done. The main thing is keeping track of IDs that already exist and update those instead of re-create them deleting the originals which can be a bit of a tricky one

For the importer, you're not going to be able to check and adjust every customers cart. It just won't work since not all of them will be logged in for a start, so guests with items in their basket you won't be able to check and alter their items as the import takes place. This is why its important to do as I've said above and track original IDs, to preserve them and prevent any going missing in the first place. The IDs for product option association are what you want to track, not a customers cart. This needs to be done by your import/export methods.

For the new option scenario, that isn't an issue. That would just be added and as nobody would have that in their basket at the time, it has no effect. In fact the only time an option would have an effect is if it is deleted. No amount of tracking of IDs will be able to prevent that from messing up a cart. The only thing to do in that situation is to delete the whole products from a customers cart if opencart notices an invalid option selected

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by eire » Sat Jun 06, 2015 9:55 am

Thanks for the detailed reply Jay, much appreciated! I will email Karapuz tomorrow.

New member

Posts

Joined
Sat Sep 22, 2012 5:04 am

Post by paulfeakins » Mon Jun 08, 2015 6:12 pm

JAY6390 wrote:That said, yeah its not a simple fix but its not a huge issue either, and as you can see from my extension live options it can be done. The main thing is keeping track of IDs that already exist and update those instead of re-create them deleting the originals which can be a bit of a tricky one
We've also noticed that in some places in OpenCart when saving, everything is deleted and then recreated rather than just updated. It's not something I've seen before so I'm just wondering if there's a reason this design decision was taken?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: paulfeakins and 18 guests