View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003050 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2011-07-12 15:30 | 2012-12-10 13:44 |
Reporter | tjungcl | Assigned To | |||
Priority | urgent | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.5.0 revision 34568 | ||||
Fixed in Version | 4.5.1 revision 38045 | ||||
Summary | 0003050: formated delivery costs not returned when zero | ||||
Description | the function getFDeliveryCosts() in oxbasket returns the delivery costs as formated string. This does not contain the currency, which is therefore added in all tpls, where this function is called. it returns false, when delivery costs are zero, so combining with the currency, it would result in something like "costs: €" instead "costs: 4,90€". Because of this, the call to getFDeliveryCosts() is sometimes wrapped in an extra check (using getDeliveryCosts()). But: Often this is not checked at all, and some basic-tpls getFDeliveryCosts() is checked instead (which may be the reason, why getFDeliveryCosts returns false on zero). The problem about it is, that the function can not be used to show, that a shipping is free of costs (which normally is something good). It should just return the formated costs and if a template does not want to show zero shipping costs, it can check getDeliveryCosts() (without the "F") | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
@developers: check from source code side if such issue still exist |
|
Reminder sent to: tjungcl Hi, To be sure, the issue is only in emails or you found also somewhere else? Regards, |
|
true, is mainly in the email-templates, but the function is also used in azures payment.tpl: [{if $oxcmp_basket->getDeliveryCosts() }] <div id="shipSetCost"> [{ oxmultilang ident="PAGE_CHECKOUT_PAYMENT_CHARGE" }] [{ $oxcmp_basket->getFDeliveryCosts() }] [{ $currency->sign}] </div> [{/if}] This works as it is, but: If you want to say, that you charge 0,00 € for shipping costs instead of saying just nothing, you can not just remove the if-condition: getFDeliveryCosts() returns false if zero, so without the if-condition the template write only "€" instead of "0,00 €" Of course you can counteract that by adding and else block and so on, but it would be much cleaner, if getFDeliveryCosts() would just return the formated deliverycosts and not a boolean. |
|
fixed, oxBasket::getFDeliveryCost() method now always returns a formated delivery price even when it's 0 |