View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006501||OXID eShop (all versions)||2.2. Shop settings||public||2016-09-07 14:31||2016-09-30 14:52|
|Product Version||4.10.1 / 5.3.1|
|Target Version||Fixed in Version||4.10.2 / 5.3.2|
|Summary||0006501: Discounts not possible for products with variants|
|Description||Probably since Resolution of bug 0006027 not buyable parents are not only hidden when choosing a product for discount type "item", but also when selecting the products which will be discounted (tab products, assign products).|
|Steps To Reproduce||In demoshop discounts, try to create a 10% discount for jeans "anna".|
|Tags||Discount, Solution Provided, Variants|
|PHP Version||Not defined|
|Database Version||Not defined|
Unfortunately I can't reproduce this.
Did you activate the checkbox "Display Variants in Assignment Lists in eShop admin", which you find right above the checkbox ""Parent" Products can be purchased"? You find it in the administration area -> core settings -> system -> variants.
If both checkboxes are activated, then the variants and the parent article are listed. If I deactivate "parent can be purchased", then only the variants are shown. If I deactivate the checkbox "display variants in...", too, I get the behavior which you have described.
Unbuyable parents can not be selected anymore which is bad.
Reporter in 0006027 says it is wrong that you can assign an unbuyable item as a discount. He does not say it is wrong to assign an unbuyable parent to a discount. It is a good thing if unbuyable parents can be assigned, just as you can assign categories, which are also not buyable.
Category assigned: discount valid for all products in category
Parent assigned: discount valid for all variants
There are two changed files in the commit https://github.com/OXID-eSales/oxideshop_ce/pull/390/files
DiscountItemAjax.php that fixes the reported bug
DiscountArticlesAjax.php changes should be reverted
thank you for your feedback. I created a new PR (485) with your suggested changes. The class DiscountArticleAjax is reverted. Now the unbuyable parents are listed and selectable again.
||Pull request was merged with https://github.com/OXID-eSales/oxideshop_ce/commit/fca2fa8ee8cc3f0cb7c5147da91d56817e005368|