Discount Codes 6.5r1 - Upgrade Manual

Update 6.5 to 6.5r1

Upload and replace this file from the upload directory:
admin\includes\actions\discount_codes\views\new.php

*********


Update 6.4 to 6.5

*********
Step 1.)
*********
Back up the files below, including any custom template overrides.
Upload and replace these files from the upload directory:

Upload and replace all files 

If you use another selected template, update the corresponding hook in:
templates/YOUR SELECTED TEMPLATE/includes/hooks/shop/siteWide/discountCode.php
Merge any shop-specific customizations into the updated files.

No database changes or module reinstallation are required for 6.4 to 6.5.
Existing discount codes and module settings are preserved.
The shopping cart template and order total calculation module do not need
changes for this update. Keep the existing Bootstrap 5 input group markup.

*********
Step 2.)
*********
Reload the shop pages to load the updated validation scripts.
Test the shopping cart and checkout payment flows, including mobile devices:
- Validate and apply a valid code in the shopping cart, then remove it.
- Continue to checkout payment: the empty code field must stay neutral.
- Enter a valid code at checkout and select Continue immediately. Checkout
  must wait for validation, and confirmation must include the eligible discount.
- Enter an invalid code: checkout must stay on the payment page with an
  editable field. Correct it, retry, or clear it to continue without a discount.
- After a network failure or the 15-second timeout, the field must be editable
  so the customer can retry.

Checkout payment retains automatic validation; no separate Apply button is added.
Duplicate validation requests are prevented. Failed requests no longer leave
the input locked, and empty checkout fields no longer show a success icon.

For older installations, first follow the applicable upgrade steps below to
reach 6.4, then apply the 6.4 to 6.5 update above.

**********************************************************************************************************************
********************************************************************************************************************************************************************************************************************************************
Update 5.8.2/6.3 to 6.4

*********
Step 1.)
*********
Upload and replace all files 

********************************************************************************************************************************************************************************************************************************************

********************************************************************************************************************************************************************************************************************************************
Update 5.8.1 to 5.8.2

*********
Step 1.)
*********
Upload and replace: 
admin/includes/actions/discount_codes/views/new.php
********************************************************************************************************************************************************************************************************************************************

********************************************************************************************************************************************************************************************************************************************
Update 5.8.0 to 5.8.1

*********
Step 1.)
*********
Upload and replace: 
includes/languages/[YOUR_LANGUAGES]/modules/content/shopping_cart/cm_sc_discount_code.php

********************************************************************************************************************************************************************************************************************************************

Update 5.6.2 - 5.7.4 to 5.8.0

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
Take note of your settings.
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

Optional if you are using this:
admin => modules -> Content -> Discount Code[shopping_cart] 
Take note of your settings.

*********
Step 2.)
*********
Upload and replace all files, from the upload directory.

*********
Step 3.)
*********
Install: 
admin => modules => order total => discount code
Adjust to your previous settings.

Optional if you are using this:
admin => modules -> Content -> Discount Code[shopping_cart] 
Adjust to your previous settings.

**********************************************************************************************************************
Update 5.6.1 to 5.6.2


*********
Step 1.)
*********
Upload and replace the following file from the upload directory:

includes/modules/order_total/ot_discount.php


**********************************************************************************************************************
Update 5.6.0 to 5.6.1

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

*********
Step 2.)
*********
Upload and replace the following files from the upload directory:

includes/modules/order_total/ot_discount.php

*********
Step 3.)
*********
Install: 
admin => modules => order total => discount code


**********************************************************************************************************************
Update 5.5.1 to 5.6.0

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

*********
Step 2.)
*********
Upload and replace the following files from the upload directory:

admin/discount_codes.php
admin/includes/boxes/catalog_dc_content.php
includes/modules/order_total/ot_discount.php
templates/override[YOUR SELECTED TEMPLATE]/includes/hooks/shop/siteWide/discountCode.php

*OPTIONAL for the shopping cart Discount Codes Module:
includes/modules/content/shopping_cart/templates/tpl_cm_sc_discount_code.php
includes/modules/content/shopping_cart/cm_sc_discount_code.php

*********
Step 3.)
*********
Install: 
admin => modules => order total => discount code


**********************************************************************************************************************
Update 5.5.0 to 5.5.1


*********
Step 1.)
*********
Upload and replace the following file from the upload directory:

templates/override[YOUR SELECTED TEMPLATE]/includes/hooks/shop/siteWide/discountCode.php


**********************************************************************************************************************
Update 5.4.2 to 5.5.0


*********
Step 1.)
*********
Upload and replace the following files from the upload directory:

includes/languages/english/hooks/shop/siteWide/discountCode.php
includes/languages/english/modules/content/shopping_cart/cm_sc_discount_code.php
includes/modules/content/shopping_cart/templates/tpl_cm_sc_discount_code.php
includes/modules/content/shopping_cart/cm_sc_discount_code.php
templates/override[YOUR SELECTED TEMPLATE]/includes/hooks/shop/siteWide/discountCode.php


**********************************************************************************************************************
Update 5.4.1. to 5.4.2


*********
Step 1.)
*********
Upload and replace all files from the upload directory.


**********************************************************************************************************************

Update 5.4.0. to 5.4.1

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

*********
Step 2.)
*********
Upload and replace
admin/discount_codes.php
includes/modules/order_total/ot_discount.php

*********
Step 3.)
*********
Install: 
admin => modules => order total => discount code

**********************************************************************************************************************

Update 5.3.2. to 5.4.0

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

*********
Step 2.)
*********
Upload and replace
Folder upload [all files]

*********
Step 3.)
*********
Install: 
admin => modules => order total => discount code

*********
Step 4.)
*********
Delete file and folder "checkout": 
includes/modules/checkout/update_discount_codes.php
Delete file and folder "checkout_process": 
templates/default/includes/hooks/shop/checkout_process/discount_code.php
Delete file: 
templates/default/includes/hooks/shop/siteWide/discountCode.php


*********
Step 5.)
*********
If your are on Phoenix 1.0.7.14, upload and replace this file:
Phoenix_1.0.7.14_legacy/includes/system/versioned/1.0.7.10/database_order_builder.php


*********
Step 6.)
*********
Make sure you are using the "override" template and have it selected in:
Admin : Configuration : My Store : Template Selection
Otherwise you must copy:
  templates/override/includes/hooks/shop/siteWide/discountCode.php
TO:
  templates/YOUR SELECTED TEMPLATE/includes/hooks/shop/siteWide/discountCode.php

Read the install instructions.

****************************************************************************************************************************
Update 5.3.1. to 5.3.2

*********
Step 1.)
*********
Move: 
includes/hooks/shop/siteWide/discountCode.php

To:
templates/default/includes/hooks/shop/siteWide/discountCode.php

*********
Step 2.)
*********
Upload/copy and replace: 
includes/modules/order_total/ot_discount.php

****************************************************************************************************************************
Update 5.3.0. to 5.3.1

*********
Step 1.)
*********
Copy: 
includes/modules/checkout/update_discount_codes.php

*********
Step 2.)
*********
Delete: 
includes/hooks/shop/checkout_process/discount_code.php

****************************************************************************************************************************

Update 5.2.1. to 5.3.0

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

*********
Step 2.)
*********
Uninstall: 
admin => modules => content => discount code [checkout_payment]

*********
Step 3.)
*********
(optional) Uninstall: 
admin => modules => content => discount code [shopping_cart]


*********
Step 4.)
*********
Upload and replace
Folder upload [all files]

*********
Step 5.)
*********
Install: 
admin => modules => order total => discount code

*********
Step 6.)
*********
Install: 
admin => modules => content => discount code [checkout_payment]

*********
Step 7.)
*********
(optional) Install: 
admin => modules => content => discount code [shopping_cart]

*********
Step 8.)
*********
Delete files: 
includes/languages/english/modules/content/checkout_payment/cm_cp_discount_code.php
includes/modules/content/checkout_payment/templates/tpl_cm_cp_discount_code.php
includes/modules/content/checkout_payment/cm_cp_discount_code.php

****************************************************************************************************************************
Update 5.2.0. to 5.2.1

*********
Step 1.)
*********
Upload and replace
catalog/admin/discount_codes.php

*********
Step 2.) optional if using PayPal standard
*********
Upload and replace
[Modified_paypal_standard - Phoenix 1.0.5.5+]catalog/includes/modules/payment/paypal_standard.php
Or apply the new modifications, see instructions Point 4

*********
Step 3.) optional if using stripe sca
*********
Upload and replace
[Modified_stripe_sca_3.0 - Phoenix 1.0.5.5+]catalog/includes/modules/payment/stripe_sca.php
Or apply the new modifications, see instructions Point 5


****************************************************************************************************************************
Update 5.1.2 to 5.2.0

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

*********
Step 2.)
*********
Upload and replace
catalog/admin/includes/languages/[your_language]/discount_codes.php
catalog/admin/discount_codes.php
catalog/includes/modules/order_total/ot_discount.php

NOTE: For PayPal standard support, see instructions Point 4
NOTE: For Stripe SCA 3.0 support, see instructions Point 5

*********
Step 3.)
*********
Install: 
admin => modules => order total => discount code

****************************************************************************************************************************
Update 5.1.1 BS to 5.1.2 BS
Also apply these fixes to previous versions

*********
Step 1.)
*********
Upload and replace
catalog/admin/discount_codes.php
catalog/includes/modules/order_total/ot_discount.php

NOTE: For Stripe SCA 3.0 support, see instructions Point 5

****************************************************************************************************************************
Update 5.1.0 BS to 5.1.1 BS
Also apply this fix to previous versions

*********
Step 1.)
*********
Upload and replace
catalog/includes/modules/order_total/ot_discount.php

****************************************************************************************************************************
Update 5.0.0 BS to 5.1.0 BS

*********
Step 1.)
*********
Upload new file:
catalog/includes/hooks/shop/siteWide/discountCode.php

Upload and replace
catalog/includes/modules/content/shopping_cart/templates/tpl_cm_sc_discount_code.php
catalog/includes/modules/content/shopping_cart/cm_sc_discount_code.php

****************************************************************************************************************************

Update 4.x BS to 5.0.0 BS

*********
Step 1.)
*********
Uninstall: 
admin => modules => order total => discount code
IMPORTANT: Keep "Delete auto created tables when uninstalling" set to "False" to preserve your existing discount codes.

admin => modules => header tags => discount code
admin => modules => content => discount code [shopping_cart]

*********
Step 2.)
*********
Delete:
catalog/includes/modules/header_tags/ht_discount_code/[all content]
catalog/includes/modules/header_tags/ht_discount_code.php
catalog/includes/modules/content/shopping_cart/templates/discount_code.php

*********
Step 3.)
*********
Revert all discount code modifications in:
includes/application_top.php
checkout_process.php

Optional if you are using PayPal Standard, revert also in: 
catalog/includes/modules/payment/paypal_standard.php
catalog/ext/modules/payment/paypal/standard_ipn.php

*********
Step 4.)
*********

Follow the installation Instructions for all store files and modifications, except admin side.

