Skip to content

BO - Order page - Ajax issue - The gift Product is not removed when removing a product ordered #21500

Closed
Listed in
@khouloudbelguith

Description

@khouloudbelguith
Contributor

Describe the bug

Related to this PR
In the FO, when we add product A to the cart then checkout, the Order must contain Product A and Product B
In the BO > Order detail page => when we remove the Product A from the order, the cart rule is removed and Product B is not removed, we need to reload the page

Expected behavior

The ProductB should be removed

SPECS:

When a product is successfully added to the order, a notification of success is displayed: "The item was successfully added." in Admin.Notifications.Success.
Then the product list is reloaded behind the loading spinner to check if any new products could be added through automatics carts rules. The user is redirected to the first page of the product list.

When a product is removed from the order, a notification is displayed: "The item was successfully removed." in Admin.Notifications.Error.
Then the product list is refreshed behind the loading spinner to check if any gift product has to be removed as well. The user is redirected to the page where the user removed the product. If the removed product was on the last page, the user is redirected to the second-last page.

FYI: specs are updated

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to BO > Catalog > Discounts page
  2. Create a cart rule "free gift "demo_6 60*90"
  3. Go to FO > Add any other product to cart
  4. Apply the discount
  5. Continue checkout
  6. in the BO > Order detail page > remove the product Ordered
  7. See the error "The gift Product is not removed"
  8. if you reload the page => OK

Screenshots

https://drive.google.com/file/d/1N06UU3WrfwgVwgeiTDnB26R_3PEOtc3v/view?usp=sharing

Additional information

  • PrestaShop version: 177x
  • PHP version: 7.2

Activity

prestashop-issue-bot

prestashop-issue-bot commented on Oct 19, 2020

@prestashop-issue-bot

Thanks for opening this issue! We will help you to keep its state consistent

added
BOCategory: Back Office
ReadyStatus: Issue is ready to be worked on
BugType: Bug
on Oct 19, 2020
added
DiscountsLabel: Which BO under menu is concerned
MinorSeverity: minor bug > https://build.prestashop.com/news/severity-classification
OrderComponent: Which BO section is concerned
on Oct 19, 2020
added
Nice-to-haveKanban prioritization: issue could be included in next version
on Oct 19, 2020
self-assigned this
on Oct 21, 2020
self-assigned this
on Oct 30, 2020

29 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

1.7.7.xBranchBOCategory: Back OfficeBugType: BugCart rulesLabel: Which BO under menu is concernedDiscountsLabel: Which BO under menu is concernedFixedResolution: issue closed because fixedMinorSeverity: minor bug > https://build.prestashop.com/news/severity-classificationMust-haveKanban prioritization: issue must be included in next versionOrderComponent: Which BO section is concernedRegressionType: regressionUX ✔️Status: check done, design approvedWording ✔️Status: check done, wording approved

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @eternoendless@Progi1984@sowbiba@marionf@jolelievre

    Issue actions

      BO - Order page - Ajax issue - The gift Product is not removed when removing a product ordered · Issue #21500 · PrestaShop/PrestaShop