View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002773 | OXID eShop (all versions) | 1.01. Products (product, categories, manufacturer, promotions etc.) | public | 2011-04-20 15:19 | 2013-09-05 16:39 |
Reporter | tjungcl | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.5.0 revision 34568 | ||||
Target Version | 4.7.8 / 5.0.8 | Fixed in Version | 4.7.8 / 5.0.8 | ||
Summary | 0002773: (price currency) --> (currency price) very hard to switch, although its standard in many other shops | ||||
Description | Oxids templates show prices as <price> <curr> Unfortunatelly the form <curr> <price> is also very common, it is used for example by amazon.de and ebay.de In the templates the price is combined with currency as this: [{ $_oBoxProduct->getFPrice() }] [{ $currency->sign}] So to change it, you have to change two dozen templates and switch currency and price. That is quite ugly thinking on oxid-updates and there is even one more problem: For variant parents the getFPrice function returns "from 99,99" The fact, that the "from" is included within getFPrice makes it impossible to put the currency before the number, like in "from € 99,99". So a module a needed that adds the currency into the FPrice, and in all templates the <currency> would have to be removed. Thats very much to change to just switch currency and price to something that could be thought of as the default way to display a price in germany. I suggest a new function getFPriceAndCurrency() that returns the whole string. To switch price and currency, one would only have to overwrite that function. Or better: a flag in the admin could switch between the two formats. | ||||
Additional Information | I expect this issue will be closed and rejected as a feature request. But please consider it for a moment: I think of this as a flaw in the design of the v4x templates and had hoped that it would be fixed in 4.5 The suggested fix would have no compatibility issues, because the old FPrice function would still be the same, so all old templates would continue working just fine. The required changes can be done with little effort in the source-code. And it would spare the shop-owners a lot of changes that are problematic to upgrade because 16 different tpls are affected. | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
added smarty plugin; was: [{ $_oBoxProduct->getFPrice() }] [{ $currency->sign}] now: [{ oxprice price=$_oBoxProduct->getPrice() currency=$currency }] also to price can be passes simple float variable, instead of oxPrice object. [{ oxprice price="7.17" currency=$currency }] setup price format in admin: EUR@ 1.00@ ,@ .@ €@ 2 USD@ 1.2994@ .@ @ $@ 2 @Front @Front - will move price sign to front of price numbers in next major version it will be used in templates (in patch we can change templates). |