Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding products to a coupon with max_input_vars restriction #152

Closed
afinno opened this issue Sep 19, 2012 · 1 comment
Closed

Adding products to a coupon with max_input_vars restriction #152

afinno opened this issue Sep 19, 2012 · 1 comment

Comments

@afinno
Copy link

afinno commented Sep 19, 2012

So we've just noticed an issue with the hosting provider of a client.

The default value for max_input_vars in PHP (>=5.3.9) is set to 1000 and cannot be overwritten with a custom php.ini file nor is the hosting provider willing to change the default value. This essentially restricts the number of input variables that can be made per request.

Now, in the OC Admin when adding a coupon, if you click a category it will populate the products field with all products in that category. If the number of products is over 1000 (less if you include the other input vars that need to be posted on the same page) then a PHP error is generated and all extra input vars are truncated. Usually resulting an error like this:

Notice: Undefined index: date_start in /.../www/admin/model/sale/coupon.php on line 17

Are there any proposed solutions or work-arounds for this?

Is it possible to have a "coupon_category" table to deal with category level discounts instead of populating the "coupon_product" table with all products of a given category?

@opencart
Copy link
Collaborator

this is a bug tracker not a FAQ. ask in the forums. the problem you posted is related to your host not opencart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant