Open Basket Email


#1

Hello everyone,
i have a problem with the price in the open basket email it should be Brutto, but the price is Netto.
When i am trying to assign [{assign var=“basket” value=$order->getBasket()}]
i received PHP Fatal error: Call to a member function getBasket() on a non-object in /home/sportsprofi-stage/SspCustomData/tmp/be6c470e69a3650de49bec8b9e709512^%%41^410^410A257A%%OpenBasketEmail.tpl.php on line 9.
Someone can help me please?


#2

i’m afraid we are not able to help you, since OXID has no open basket email function and we can not view the code.
There must be a module for this open basket emails, you need to find out who created this module and ask him.


#3

Okay, let me change a little bit my question:

In the same directory where standard .tpl template files are (order_owner.tpl, order_cust.tpl…) I have template file OpenBasketEmail.tpl
The functionallity of this .tpl file is to display products in the email if someone leave the products in the basket and didn’t finish the order
So, the problem is that in this email, prices are always displayed as netto, but should be displayed with country specific VAT, depending
of delivery country of the customer.
But, when I am trying to do like this

[{assign var="user"      value=$oEmailView->getUser()}]
[{assign var="basket"    value=$order->getBasket()}]

The variables cannot be assigned and I don’t know why, because this kind of assignment is working properly in the .tpl files that I mentioned above: (order_cust.tpl and order_owner.tpl)

For now, the netto price is displayed using this way:

[{foreach from=$emailData.listBasketItems item="currBasketItem"}]
[{$oViewConf->formatPrice($currBasketItem.price)}]  [{$currency->sign}]
[{/foreach}]

But, when I am trying to print currBasketItem, it doesn’t contains data that I need (User Delivery Country from the Basket, Brutto Price of the product that is in the basket or Country Specific VAT).
Thanks for your help in advance.


#4

Data available in template files depends on the data provided by the controller / PHP file, that serves this template. There is different data available in different controllers, you can not use every function or variable from one template in another, if it’s PHP file does not provide same data. (MVC pattern)

Since somebody did not finish the checkout, there is no order at all, therefore you obviously can not use $order object.