- Posts: 42
- Thank you received: 1
Upgrade custom page
there is a system to keep the changes made to the product page, even after a hikashop upgrade?
Please Log in or Create an account to join the conversation.
You have to use the view override system :
www.hikashop.com/support/documentation/1...-display.html#layout
Please do not edit HikaShop core files directly.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
now we are waiting for the next upgrade, but I'm sure everything will be fine.
If I can ask another little question:
How can I view in admin the prices of the variants, and in any case in the admin view all prices including VAT?
Please Log in or Create an account to join the conversation.
First to get your variant prices, see my screenshot :
In product configuration page, if your product have some variants to will see a Variants tab, you have to select one your variant to see its price.
Second question, there is no page in HikaShop that list all product complete prices (with VAT), but maybe we can find solutions if you explain your needs and concrete use you have in mind.
Regards
Please Log in or Create an account to join the conversation.
The reason for this requirement is simple: to have a general overview of prices with VAT, for products with variants and for products without variants.
We always treat the prices with VAT, for the catalog, for the customer who buys, for the price attached to the product on display, for everything.
Working with prices without VAT is inconvenient for us
Please Log in or Create an account to join the conversation.
Then enter the prices you want in the main product. They won't be used on the product page or for any variant if you have prices in variants. It will only be used on the listings.
Please Log in or Create an account to join the conversation.
In addition I also have single products without variant
Please Log in or Create an account to join the conversation.
I don't understand what you mean ? What is the problem with entering prices in the main product ?
Please Log in or Create an account to join the conversation.
I have to display the costs of products with VAT in the backend, and I have to do this for products with variants and for products without variants.
You advise me to enter the price including VAT in the field for a product without variants, so as to be able to display it in the backend.
But my problem is solved in half
because I will continue to see the price of products without variant, missing VAT
if you look at my attachment you understand well what I would like to do. If you can not do it, that's fine.
Otherwise I can try to edit the files, but I'd like to avoid this
Please Log in or Create an account to join the conversation.
Thanks, it's much more clear now.
My answer was only to allow you to have prices for products with variants.
I didn't understand that you also wanted the prices with tax instead of without.
For that, you need to edit the file "listing" of the view "product" for your backend template via the menu Display>Views and change the line:
$field = 'price_value';
to:
$field = 'price_value_with_tax';
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
That's because all the prices have the same minimum quantity and the same currency. Change the minimum quantity (it won't impact the prices since the customers will only see the variants prices) of two of the prices and it will display them too.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
to view the price with VAT in the product list I modified the file: LIST > $ field = 'price_value_with_tax';
How can I do the same thing in the list of variants?
Which view should I change?
Please Log in or Create an account to join the conversation.
In the file "form_variants", you'll find that code:
$this->currencyClass->displayPrices(@$variant->prices);
that you can change to:
$this->currencyClass->displayPrices(@$variant->prices, 'price_value_with_tax');
Please Log in or Create an account to join the conversation.
show me all prices of the variants € 0.00
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Ah yes, you also need to add the line:
$price->price_value_with_tax = $this->currencyClass->getTaxedPrice($price->price_value,hikashop_getZone(),$product->product_tax_id);
after:
Please Log in or Create an account to join the conversation.
god save the HikaShop
ps
the change made so I will keep it even after an update or I'll lose it and I'll have to redo it?
Please Log in or Create an account to join the conversation.
The change to administrator/components/com_hikashop/views/product/view.html.php has been added on our end.
For the other changes, if you made them via the Display>Views menu, they are saved as overrides and thus you won't loose them when you update/upgrade your HikaShop.
Please Log in or Create an account to join the conversation.