View Issue Details

IDProjectCategoryView StatusLast Update
0004701OXID eShop (all versions)3.1. Design, GUI, UXpublic2013-01-11 17:28
Reporterleofonic Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.7.0 / 5.0.0 revision 51243 
Fixed in Version4.7.2 / 5.0.2 revision 53018 
Summary0004701: "Price From"-calculation sets inherited prices to zero
DescriptionIf price of a variant is set to zero, this variant inherits price from parent. "price from" of parent incorrectly shows: "from 0,00€".
Steps To ReproduceIn demoshop, set price of a variant to zero, look at parent in frontend.
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

andrius.silgalis

2012-11-16 12:31

reporter   ~0007882

Last edited: 2012-12-03 10:20

Changed the update script 49955.sql part which updates min/max variant prices.

UPDATE `oxarticles`
    INNER JOIN (
        SELECT
            MIN( IF( `v`.`oxprice` > 0, `v`.`oxprice`, `p`.`oxprice` ) ) AS `varminprice`,
            MAX( IF( `v`.`oxprice` > 0, `v`.`oxprice`, `p`.`oxprice` ) ) AS `varmaxprice`,
            `v`.`oxparentid`
        FROM
            `oxarticles` AS `v`
            LEFT JOIN `oxarticles` AS `p` ON ( `p`.`oxid` = `v`.`oxparentid` AND `p`.`oxprice` > 0 )
        WHERE
            ( `v`.oxactive = 1 AND ( `v`.`oxstockflag` != 2 OR ( `v`.`oxstock` + `v`.`oxvarstock` ) > 0 ) AND IF( `v`.`oxvarcount` = 0, 1, ( select 1 from `oxarticles` as `art` where `art`.`oxparentid` = `v`.`oxid` and ( `art`.`oxactive` = 1 ) and ( `art`.`oxstockflag` != 2 or `art`.`oxstock` > 0 ) limit 1 ) ) )
        AND `v`.`oxparentid` IS NOT NULL
        AND `v`.`oxparentid` != ''
        GROUP BY
            `v`.`oxparentid`
    ) AS `arts` ON `oxarticles`.`oxid` = `arts`.`oxparentid`
SET
    `oxarticles`.`oxvarminprice` = `arts`.`varminprice`,
    `oxarticles`.`oxvarmaxprice` = `arts`.`varmaxprice`;

leofonic

2012-11-28 18:25

reporter   ~0008020

Now inherited Price of Variant is not taken into account in from price at all.
For example if price of parent is 4, first variant is 0, second variant is 8, only "8" is displayed (should be "from 4").
Probably related to 0004515.

andrius.silgalis

2012-12-03 10:23

reporter   ~0008037

Updated var min price calculation.
Also updated the update script, please see note https://bugs.oxid-esales.com/view.php?id=4701#c7882