Post by straightlight » Tue Jun 21, 2016 7:48 pm

Product min qty is set to 1. But isn't that irrelevant? Product qty is 12. All qty options add up to 12, both product and options subtract stock. So it's correct as far as I can see.
The point of the last instructions was to see if you did configured this option since, yes, it is relevant. Opencart validates the minimum quantity and included in my code modifications above along with the product option value quantity. If the defined value for the minimum quantity in the admin is already configured, that's fine since most merchants may oversee this step. ;)
A product may have one option with qty of 2 and one option to with qty of 5. That's a total of 7 for main product. Min qty for main product would be 1?
The minimum main product quantity would be 1, that is correct. What my modifications above provides is if the main product quantity is higher than the product option value quantity, that wouldn't fit the scale so it provides an error message on the products page, in this case.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SXGuy » Tue Jun 21, 2016 7:54 pm

So now we have established everything is as it should. Why will it only allow a qty the same as the lowest option qty?

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by straightlight » Tue Jun 21, 2016 8:06 pm

I believe this behavior is caused by unbalanced fields in the catalog model product file. The option ID and the product Option ID should both be added into each arrays accordingly which doesn't seem to be the case at this actual time.

I have modified my instructions on the previous page of this topic. Can you refollow the controller step part and see if that resolves the issue?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SXGuy » Tue Jun 21, 2016 8:35 pm

Ok will do. Will try again later and get back to you. Thanx.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by SXGuy » Tue Jun 21, 2016 10:14 pm

Well. sorry to say, but the edited code had the reverse effect.

It only allows the max qty for the first option in the list. as opposed to the last option previously.

btw you have an extra } in your edited code.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by straightlight » Tue Jun 21, 2016 10:19 pm

I posted a bug fix momentarily on the bug reports section of the forum: http://forum.opencart.com/viewtopic.php?f=191&t=164239 . After trying this, do you notice the same behavior? Since the code I added on the first page has nothing implicating a minimum or maximum value unless from the admin product options page, you set a different variation of options.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SXGuy » Wed Jun 22, 2016 3:28 am

No it didnt appear to make any difference, however ive just had a look at my sql database and im unsure whether this looks correct, if not it could be the issue.

table product_option_value

Heres an example of a couple of the lines

Product_Option_Value_ID 73
product_option_id 250
product_id 70
option_id 16
option_value_id 72

it appears that in each line, product_option_value_id is 1 increment higher than the value of option value_id

another line shows product_option_value_id as 65 and option_value_id as 64

every single entry, product_option_value_id is 1 increment higher than option_value_id.

is it ment to be this way, or should they match?

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by straightlight » Wed Jun 22, 2016 3:31 am

is it ment to be this way, or should they match?
After applying my fix from the bug reports, each option, option value, option value description, product option and product option values should match with the selected main product.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SXGuy » Wed Jun 22, 2016 3:54 am

They all match the product id perfectly. It was just those two I mentioned that I wasn't sure whether the values should match.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by straightlight » Wed Jun 22, 2016 4:01 am

SXGuy wrote:They all match the product id perfectly. It was just those two I mentioned that I wasn't sure whether the values should match.
Yes, each should match relatively with the selected product ID. None should differentiate unless using an extension or if you're not sure from the admin products options if the product option is related to the right place. ;)

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SXGuy » Wed Jun 22, 2016 4:06 am

I'm at a loss then. I think I will try again on a clean local host install various release versions and see if the issue remains. If it doesn't. I'll compare files to see what's different.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by straightlight » Wed Jun 22, 2016 4:25 am

That is definitely a great idea.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 21 guests