Skip to content

Upgrading to 2.0 ​

2.0.0 is a major release. Most sites update without changes, but read this page before you update: it lists what you have to check in your templates and rules. All changes are in the changelog.

Follow the update instructions. Make a backup of the files and the database first, and test the update on a copy of your site when you can.

Requirements ​

2.0.0 requires ExpressionEngine 7.3+, PHP 8.2+ (the same as Reinos Store) and Reinos Store 4.0.0+. For ExpressionEngine 6 and lower use the legacy package in the download (legacy/ee_reinos_store_price_rule-v1.1.1.zip).

Update Reinos Store to 4.0.0 or later first, see Upgrading to 4.0 of the Store. The install and the update check the Reinos Store version: without Reinos Store 4.0.0 the install stops with an error, the update is skipped with a notice and the control panel of this module shows an error.

Check your templates ​

Coupon code errors ​

{cart:coupon_code_error} of the Store module tells the customer why a code gives no discount: used when a usage limit of the rule is reached, invalid otherwise. When the code can't be used anymore when the order is placed (e.g. a single-use code that was used for another order in the meantime), the order is not placed and the checkout shows {global_error:coupon_code}, instead of placing the order without the discount.

Show both errors in your templates, so the customer knows why the discount is gone. See Coupon codes and the Cart tag of the Store.

Removed global variable ​

The unused {reinos_store_price_rule_action_url} global variable is removed. Remove it from your templates.

Check your rules ​

Codes ​

  • Every rule has its own code: a code that is already used by another rule is not accepted, and a rule with By code needs a code. See Code
  • When the code of a moved Store discount is already used by another rule, the rule is disabled and an error is logged. Check the log, give the rule another code and enable it.

Stacking discounts ​

With Enable Stacking Discounts off, only the first matching Buy X Get Y Free rule adds its free products, like the cart and product rules. Before, every matching Buy X Get Y Free rule did. Turn on the setting when the rules should stack, see Enable Stacking Discounts.

Reinos Store 4.0.0 also stores this setting as off when it was never saved, see Stacking discounts of the Store.

After the update ​

The cart, product and buy x get y free rules are on one Rules page in the CP now, and some CP URLs changed. The old pages (cart_rules, product_rules, buy_x_get_y_free_rules) redirect to the new page; update your bookmarks.

For developers ​

When you have your own add-on or custom code that uses Store Price Rule:

  • The add-on uses the ExpressionEngine 7 add-on installer (with migrations), extension, module and control panel route classes.
  • A new rule is added via <rules page>/new (was <rules page>/0), a rule is moved via up/<rule_id> and down/<rule_id> (was up/<rule_id>/<rules page>), and rule/<rule_id> is removed.
  • The act_route action, a test action and the sessions_start, cp_js_end and reinos_store_price_rule_format_type hooks are removed (Reinos Store no longer calls the last one).
  • The reinos_store_price_rule_buy_x_get_y_free database table is removed.