BO - Order creation - Search/ Add/ Remove a voucher

Details

Steps

Step Description Expected result
First check: cart rule without code

Go to BO > Orders > Orders > Click Add new order > Search for an existing customer like John Doe and Choose it
Customer John Doe is chosen
Search for the product “Mug The adventure begins” and click Add to cart The product is well added to the cart, check that
# Image => ok
# Description => Mug The adventure begins
# Reference => demo_12
# Base price => 11.9 (price product tax excluded - 20%)
# Quantity => 1
# Price => 11.9 (price product tax excluded -20%)

In the Vouchers block, check that a cart rule line is well displayed and check that
# Name => ok
# Description => ok
# Value => ok

In the Summary Block, check that:

Total vouchers (Tax excl.) === Value cart rule
Total (Tax excl.) === Total products - Total vouchers (Tax excl.)
Click on Remove button to remove the cart rule Check that the cart rule is not removed
( it can’t be removed because it is a cart rule without code as in the FO)
Go to BO > Catalog > Discounts page The discounts page is well displayed
Remove the cart rule without code created in the pre-condition An alert “Successful deletion.” is well displayed and the cart rule is well removed
Second check: cart rule with code

Go to BO > Orders > Orders > Click Add new order > Search for an existing customer like John Doe and Choose it
Customer John Doe is chosen
Search for the product “Mug The adventure begins” and click Add to cart The product is well added to the cart, check that
# Image => ok
# Description => Mug The adventure begins
# Reference => demo_12
# Base price => 11.9
# Quantity => 1
# Price => 11.9

In the Vouchers block, check that no cart rule added
Search with the cart rule name created in the pre-condition (with code) A dropdown list is well displayed with the exact name & code
Click on it In the Vouchers block, check that a cart rule line is well displayed and check that
# Name => ok
# Description => ok
# Value => ok

In the Summary Block, check that:

Total vouchers (Tax excl.) === Value cart rule
Total (Tax excl.) === Total products - Total vouchers (Tax excl.)
Search with the cart rule code created in the pre-condition (with code) A dropdown list is well displayed with the exact name & code
Click on it A red alert is displayed {color:red}This voucher is already in your cart{color}
Click on the Remove button In the Vouchers block, check that a cart rule line is not displayed

In the Summary Block, check that:

* Total vouchers (Tax excl.) === 0
* Total (Tax excl.) === Total products
In the input, search with a invalid name A dropdown is displayed “No voucher was found”

 

PS: this step is blocked by this issue:{color:#172b4d} [https://github.com/PrestaShop/PrestaShop/issues/27870]{color}
Click Add a new voucher Popup displays
Set these fields:
* Information:
* Name
* Description
* Status = Disabled
* Actions:
* Discount = 20%

and click on Save
The pop up is no more displayed
Search for voucher just created > Choose the voucher A red alert {color:#FF0000}This voucher is disabled {color:#172b4d}is displayed{color}{color}
Set these fields:
* Information:
* Name
* Description
* Code
* Status = Enabled
* Actions:
* Gift = a demo product

and click on Save
The pop up is no more displayed
Search the voucher & Click on it In the Product block check that:
# A product is well added
# Base price === Gift
# Price === Gift

In the Vouchers block, check that a cart rule line is well displayed and check that
# Name => ok
# Description => ok
# Value === price of the product tax excluded

In the Summary Block, check that:

Total vouchers (Tax excl.) === 0
Total (Tax excl.) === Total of the first product only
Click Remove In the Product Block check that:
* The gift product is removed

In the Vouchers block, check that a cart rule line is not displayed

In the Summary Block, check that:
* Total vouchers (Tax excl.) === 0
* Total (Tax excl.) === Total products
Set these fields:
* Information:
* Name
* Description
* Code
* Status = Enabled
* Actions:
* Free shipping

and click on Save
The pop up is no more displayed
Search the voucher and Click on it In the Vouchers block, check that a cart rule line is well displayed and check that
# Name => ok
# Description => ok
# Value === 0
In the Shipping Block, select My carrier 1. The carrier is well changed

2. In the voucher block, the value of the discount is well updated === price of “My carrier” tax excluded ( ===7)

3. In the Summary Block, check that:
* Total vouchers (Tax excl.) === the value of the discount (===7)
* Total (Tax excl.) === Total products
Click Remove In the Vouchers block, check that a cart rule line is not displayed

In the Summary Block, check that:
* Total vouchers (Tax excl.) === 0
* Total (Tax excl.) === Total products + Total shipping (Tax excl.)