I need to fill in this field below, with the value of the product WITHOUT TAX, next to it, presenting the value WITH TAX, as it is. How to do this?
Tks.

Unfortunatly i have already tried to edit the cart controller, but it seems like it wont apply any changes i make to that file, when i try to reflect the data on the twig file it stays empty.mikeinterserv wrote: ↑Tue Apr 12, 2022 12:57 amThat part of the cart has totals only.
You are going to need get the product price from the cart controller and make it available to the twig view
Then alter the twig view to reflect how you want the data. I will make an extension for it if you want.
Did you search the marketplace for extensions for cart ?
Clipboard01.jpg (11.43 KiB) Viewed 1575 times
how can i make it work like yours ? can you share your code ?mikeinterserv wrote: ↑Tue Apr 12, 2022 1:28 amWell you didn't do it right
Do you want it too look like this
There is NO KNOWN ISSUE with the controller at all, as you put it.
What THEME are you using and what OTHER EXTENSIONS do you have installed
Not normallyMateusAMOK wrote: ↑Tue Apr 12, 2022 1:43 amhow can i make it work like yours ? can you share your code ?
Code: Select all
<td class="text-right"> {{ product.price }}</td>
Code: Select all
<td class="text-right">{{ product.extaxprice }}: Ex Tax<br> {{ product.price }}: Inc tax</td>
Code: Select all
$data['products'][] = array(
'cart_id' => $product['cart_id'],
'thumb' => $image,
'name' => $product['name'],
'model' => $product['model'],
'option' => $option_data,
'recurring' => $recurring,
'quantity' => $product['quantity'],
'stock' => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')),
'reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''),
'price' => $price,
'total' => $total,
'href' => $this->url->link('product/product', 'product_id=' . $product['product_id'])
Code: Select all
$data['products'][] = array(
'cart_id' => $product['cart_id'],
'thumb' => $image,
'name' => $product['name'],
'model' => $product['model'],
'option' => $option_data,
'recurring' => $recurring,
'quantity' => $product['quantity'],
'stock' => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')),
'reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''),
'price' => $price,
'total' => $total,
'extaxprice' => $this->currency->format($product['price'], $this->session->data['currency']),
'href' => $this->url->link('product/product', 'product_id=' . $product['product_id'])
I tried to do it as you had it, copied your code but it seems to have no effect, any additions i make to the controller file makes no changes as i already said before.mikeinterserv wrote: ↑Tue Apr 12, 2022 1:47 amNot normallyMateusAMOK wrote: ↑Tue Apr 12, 2022 1:43 amhow can i make it work like yours ? can you share your code ?
But here
Twig
ChangeTOCode: Select all
<td class="text-right"> {{ product.price }}</td>
Controller FINDCode: Select all
<td class="text-right">{{ product.extaxprice }}: Ex Tax<br> {{ product.price }}: Inc tax</td>
and ADD extaxpriceCode: Select all
$data['products'][] = array( 'cart_id' => $product['cart_id'], 'thumb' => $image, 'name' => $product['name'], 'model' => $product['model'], 'option' => $option_data, 'recurring' => $recurring, 'quantity' => $product['quantity'], 'stock' => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')), 'reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''), 'price' => $price, 'total' => $total, 'href' => $this->url->link('product/product', 'product_id=' . $product['product_id'])
Exit :-)Code: Select all
$data['products'][] = array( 'cart_id' => $product['cart_id'], 'thumb' => $image, 'name' => $product['name'], 'model' => $product['model'], 'option' => $option_data, 'recurring' => $recurring, 'quantity' => $product['quantity'], 'stock' => $product['stock'] ? true : !(!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning')), 'reward' => ($product['reward'] ? sprintf($this->language->get('text_points'), $product['reward']) : ''), 'price' => $price, 'total' => $total, 'extaxprice' => $this->currency->format($product['price'], $this->session->data['currency']), 'href' => $this->url->link('product/product', 'product_id=' . $product['product_id'])
Im using the DEFAULT THEME and NO CART EXTENSIONSmikeinterserv wrote: ↑Tue Apr 12, 2022 11:26 pmThen you must have a modification using the cart file OR you have edited it in the theme editor.
catalog/controller/checkout/cart.php is the correct file.
I will make a modification for you and you can see if that works.
I asked you before - WHAT THEME and EXTENSIONS are you using.
The extension this active, but not edited the pricemikeinterserv wrote: ↑Wed Apr 13, 2022 12:26 amTry this
Its an XML mod.
I will make an events one as well
preço sem iva its a colum we added to receive the price without tax unlike yours that is both in the same colum, and i said i did modifie the file just not trough the desing editor in the backofficemikeinterserv wrote: ↑Wed Apr 13, 2022 12:45 amOK i in modifications you will see LOG
Find the line that starts with this below cut and paste here. should be just a few lines long
ALSO - THAT IS NOT A STANDARD OC CART PAGE WHAT IS PRECO SEM IVA
YOU HAVE A MODIFIED FILE after INSISTING YOU DO NOT
---------------------------------------------------------
ExTaxCartPrice
Code: Select all
{<td class="text-right"> {{ product.price }}</td>
Code: Select all
<td class="text-right"> {{ product.price }}</td>
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Users browsing this forum: Majestic-12 [Bot] and 67 guests