| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Showing some calculation at checkout | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Showing some calculation at checkout
Hi there,
can somebody help me, I'm pretty stuck here I tried to calculate processing time depending on items in cart and orders in status 'P' so I created a mod that extends cart class like this: Code:
This works fine on cart page, where I added a twig like this: theme_tweaker\customer\shopping_cart\parts\process ingtime.twig Code:
It shows up beneath subtotal, you can see in screenshot 1. Then I wanted to add the same to FastLaneCheckout right beneath shipping methods so that customers can combine delivery time with processing time. theme_tweaker\customer\modules\XC\FastLaneCheckout \sections\shipping\processingtime.twig Code:
I had to add .cart before getProcessingTime(), otherwise I got this error Quote:
But with this.cart.getProcessingTime() the error disappears and the page is shown correctly but the value of this.cart.getProcessingTime() is missing. (screenshot 2). The function is there, but it won't return anything. I added var_dump at the beginning so I found out it won't even get called. I'v been trying for hours and days. I tried different things: various listviews on that page, extending other classes like controller\customer\checkout and so on, but nothing. What am I missing? I just learned about x-cart 5 file structure and twig templates, adding modules and redefining classes. I didn't read the whole developer manuals so I think it's just something real stupid that I did wrong. Do you have any suggestions? Best regards, Daisy
__________________
X-Cart Business 5.4.1.35 |
|||||||
|
|||
X-Cart forums © 2001-2020
|