View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006670 | OXID eShop (all versions) | 1.01. Products (product, categories, manufacturer, promotions etc.) | public | 2017-07-25 11:51 | 2024-06-12 07:43 |
Reporter | vanilla thunder | Assigned To | |||
Priority | low | Severity | tweak | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | 4.10.3 / 5.3.3 | ||||
Summary | 0006670: inconsistent active/inactive handling for promotions | ||||
Description | when creating new promotions, the initial label for active state checkox is "always active" or you can set "active for a period" dates. But if you choose type "promotion", label "always active" becomes just "active" and promotions (type) need valid "active from" timestamp to be loaded, even if they are active. IMHO promotions (type) should be handled the same way as actions and banners: be "always active" or "active for period". | ||||
Steps To Reproduce | don't use demoshop, it does not parse smarty in cms pages. 1) copy-paste this code into any cms page (e.g. oxagb or oxstartwelcome): <h2>active promotions: [{$oView->getPromoCurrentList()|@count}]</h2> [{foreach from=$oView->getPromoCurrentList() item="_promo"}] [{$_promo->oxactions__oxtitle->value}]/[{$_promo->oxactions__oxlongdesc->value}] [{/foreach}] 2) open this cms page in frontend in new tab, it says "active promotions: 0" 3) admin -> Customer Info -> promotions 4) new promotion: check "always active", leave "active from" empty and set type "promotion". save. 5) you will notice "always active" changed to "active", in top promotions list this promotion is listed as active 6) reload cms page in frontend, it still says "active promotions: 0" 7) set "active from" date e.g. 2000-01-01", save 8) reload cms page and you will finally see this promotion. | ||||
Additional Information | Therefore the sql query generated in oxActionList::loadCurrent() need to be changed. It is like "SELECT ... WHERE (oxactiveto == 0 OR oxactiveto > today) AND oxactivefrom != 0 AND oxactivefrom < today" I think, the oxactivefrom check at least should be "OR" instead of "AND", just like oxactiveto check: " ... ( oxactivefrom == 0 OR oxactivefrom < today ) ..." or handled the same way as banners + action: "always active" or "active for a priod" and utilize $oBaseObject->getSqlActiveSnippet(). | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
I agree with you this can be confusing to people used to the admin interface in general. Since this would be a behavior change, we could only do something like this in a major release. Also all promotions that are still in the database would then be permanently active so they would need to be migrated by date. Since both this feature and the current admin interface are both on the list of things to be overhauled in one of the next major releases, we will not invest this effort right now and keep this as it currently is. |