code4business / freeproduct2

Magento2 extension that allows creating sales rules that add gift products.
64 stars 28 forks source link

Can't place order in magento 2.4.3-p1, getting error "add_gift_foreach is unknown type" . #36

Open anasshl opened 2 years ago

anasshl commented 2 years ago

Preconditions

Settings / Sale Rules

  1. Create new sales rule
  2. Add gift product SKU
  3. Set Discount amount to 1
  4. Set Maximum Qty Discount is Applied To 1
  5. Set condition -Row total in cart greater then 50 -

Steps to reproduce

  1. Install extension
  2. Add product to cart
  3. Check if gift Item is added to cart and go to checkout page
  4. Click button Place Order

Expected result

  1. Order Success

Actual result

  1. Error 500 "message":"add_gift_foreach is unknown type", "trace":"#0 \/srv\/web\/staging\/vendor\/magento\/module-sales-rule\/Model\/RulesApplier.php(224): Magento\SalesRule\Model\Rule\Action\Discount\CalculatorFactory->create()\n
domeglic commented 2 years ago

Sorry for the delay, is the module version really 1.0.0? Because I wasn't able to reproduce it.