Post by chaptan » Fri Nov 08, 2024 7:45 pm

Version 3.0.3.9
Opencart Novice....ish
Hi, im trying to edit an order on my test site.
We import the orders from the live site (very old Version 1.4.9.3) (my mod), for testing purposes and for upgrading later on.
On the order Info page everything is correct, but when you go to edit the order, one product is missing.
Its baffling me because the order_product table seems to have the product?
Can anyone explain the order product retrieval difference between Order Info and Order Edit?
It seems to be an API or Cart session thing? (which is new to me). Stock is OK.

I'm basically just trying to understand why there is a difference.

Regards
Steve
Last edited by chaptan on Sat Nov 09, 2024 7:18 pm, edited 1 time in total.

:crazy: Just an Enthusiast. I wish we had computers at school!


User avatar
New member

Posts

Joined
Sun Oct 31, 2010 10:19 pm
Location - UK

Post by JNeuhoff » Fri Nov 08, 2024 8:36 pm

Does your order_product table still use valid current product_ids? Or have you changed your current products since then?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by chaptan » Fri Nov 08, 2024 10:19 pm

JNeuhoff wrote:
Fri Nov 08, 2024 8:36 pm
Does your order_product table still use valid current product_ids? Or have you changed your current products since then?
Hi JNeuhoff, yes the product id same as live site for the product in question.

It has to be something like that though, just not getting any errors at all.
Even tried adding the item to the order but no error, just posts and nothing happens(nothing comes back JSON i believe).

Either mismatch of data or missing some data from a new table only in new version. Thats why i thought its todo with API or cart.

I think like you say, there must be a mismatch somewhere.

Sometimes trying to explain the problem, gives me help to find the answer. Not happening so far, im still baffled lol

EDIT: just tried getting the product data result for both INFO and getForm with firePHP. Both the results have the product in question....BUT the product options on other products in order are not showing correctly in EDIT(getForm) order product list. So i think it must be a clash witrh product options somehow. Which also could be something to do with my modding(maybe).
15 products in both product data results, but only shows 13 products in EDIT order product list and options not correct. So i think i need to fix the options first.
Last edited by chaptan on Fri Nov 08, 2024 11:08 pm, edited 2 times in total.

:crazy: Just an Enthusiast. I wish we had computers at school!


User avatar
New member

Posts

Joined
Sun Oct 31, 2010 10:19 pm
Location - UK

Post by ADD Creative » Fri Nov 08, 2024 10:55 pm

Use you web browsers developer tool to inspect the payload of the call to index.php?route=api/cart/add when editing the order. Also check the response of index.php?route=api/cart/products. See if there are any differences in the product_ids.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by chaptan » Fri Nov 08, 2024 11:19 pm

ADD Creative wrote:
Fri Nov 08, 2024 10:55 pm
Use you web browsers developer tool to inspect the payload of the call to index.php?route=api/cart/add when editing the order. Also check the response of index.php?route=api/cart/products. See if there are any differences in the product_ids.
Thanks ADD Creative, i have just edited my post, looks like we had same thought. although i havent checked api/cart yet. I think i will fix options first which im hoping will sort out the rest. I was stuck, brain had siezed, its been jump started now. If i recall correctly the options in version 1.4 where different to version 3. so it is ids that are the problem(so both of you are correct), its the options ids. I think? Thanks again.

:crazy: Just an Enthusiast. I wish we had computers at school!


User avatar
New member

Posts

Joined
Sun Oct 31, 2010 10:19 pm
Location - UK

Post by chaptan » Sat Nov 09, 2024 7:17 pm

OK, spent some time this morning , changing order_option_table in new version manually for the order. Obviously my import needs some work.
Worked edit order now shows options correctly.
Still missing the item.
Reason:
Doh, i have another mod that restricts quantities for customer groups. I had set to a quantity lower than order quantity for the item in new version. So that was the reason it wasnt showing. Increased the quantity restriction and it showed. Again, obviously needs some more work, to at least give me a clue lol

All this will be irrellevent when it goes live, but its taught me something.

Thanks again toJNeuhoff and ADD Creative for their input, i appreiciate it. It helps to talk things through and the wife/freinds dont understand any of it lol

:crazy: Just an Enthusiast. I wish we had computers at school!


User avatar
New member

Posts

Joined
Sun Oct 31, 2010 10:19 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 22 guests