View Issue Details

IDProjectCategoryView StatusLast Update
0006529OXID eShop (all versions)2.2. Shop settingspublic2016-10-19 09:22
Reportersyd Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version4.10.1 / 5.3.1 
Summary0006529: Certain article cannot be assigned to discounts
Description''application/controllers/admin/discount_articles_ajax.php'':
<code>$sQAdd .= $oConfig->getConfigParam('blVariantsSelection') ? '' : "and $sArticleTable.oxparentid = '' ";

//0006027
//if we have variants then depending on config option the parent may be non buyable
//when the checkbox is checked, blVariantParentBuyable is true.
$sQAdd .= $oConfig->getConfigParam('blVariantParentBuyable') ? '' : "and $sArticleTable.oxvarcount = 0";</code>

If ''blVariantsSelection'' and ''blVariantParentBuyable'' are both false the generated query reads
<code>
SELECT
  *
from
  oxv_oxarticles_de
where
  1
  and oxv_oxarticles_de.oxparentid = ''
  and oxv_oxarticles_de.oxvarcount = 0
[...]
</code>

So only main articles without variants are returned and can be assigned to discounts.
TagsNo tags attached.
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Relationships

duplicate of 0006501 resolvedrobert blank Discounts not possible for products with variants 

Activities

syd

2016-10-18 17:08

reporter   ~0011842

Sorry about the formatting, I used the wrong syntax obviously.

QA

2016-10-19 09:22

administrator   ~0011843

1. The help text of the variable "blVariantsSelection"(Master-Settings->Core Settings->System->Display Variants in Assignment Lists in eShop admin) states -
     
    "In eShop there are many lists for assigning products, e.g. assigning products to discounts. If this setting is checked, variants are shown in these lists, too. "

So when it is false(unchecked), the variants of articles are not to be displayed in Lists in the Shop Admin.
Hence the condition $sArticleTable.oxparentid = '' "

2. Regarding the variable "blVariantParentBuyable", kindly refer to the Bug:0006501