View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004701 | OXID eShop (all versions) | 3.1. Design, GUI, UX | public | 2012-11-10 21:35 | 2013-01-11 17:28 |
Reporter | leofonic | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.7.0 / 5.0.0 revision 51243 | ||||
Fixed in Version | 4.7.2 / 5.0.2 revision 53018 | ||||
Summary | 0004701: "Price From"-calculation sets inherited prices to zero | ||||
Description | If 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 Reproduce | In demoshop, set price of a variant to zero, look at parent in frontend. | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
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`; |
|
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. |
|
Updated var min price calculation. Also updated the update script, please see note https://bugs.oxid-esales.com/view.php?id=4701#c7882 |