Upgrade custom page

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295154

Hi
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.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 4 months ago #295155

Hello,

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.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295194

OK change made,
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?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
6 years 4 months ago #295212

Hello,

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

Last edit: 6 years 4 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295273

Thanks for the reply
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.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 4 months ago #295280

Hi,

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.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295299

Ok but so I will have only one price for more variations
In addition I also have single products without variant

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 4 months ago #295319

Hi,

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.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295329

I repeat my problem because maybe I did not explain well:

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.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 4 months ago #295331

Hi,

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.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295351

ok, we're almost there
now prices with VAT of products without variants are displayed well

and you also see the first of the variant product prices

there are no prices after the first when there are variants

look at the product with id # 1 attached




Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 4 months ago #295390

Hi,

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.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295394

OK it's good

thank you



Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295604

Hi,
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.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 4 months ago #295625

Hi,

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.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295628

it does not work
show me all prices of the variants € 0.00

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295656

try to sent php screenshot



Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 4 months ago #295630

Hi,

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:

if(empty($product->variants[$ppid]->prices))
							$product->variants[$ppid]->prices = array();
in administrator/components/com_hikashop/views/product/view.html.php

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 1
6 years 4 months ago #295674

great
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.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
6 years 4 months ago #295675

Hi,

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.

Time to create page: 0.132 seconds
Powered by Kunena Forum