Showing some calculation at checkout
2 Attachment(s)
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:
namespace XLite\Module\Dsy\ProcessingTime\View; 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 |
Re: Showing some calculation at checkout
done... found the correct viewer class to use and solved error in redefinition :roll:
|
All times are GMT -8. The time now is 09:14 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.