Issues wit product codes in Variant

  • Posts: 52
  • Thank you received: 4
  • Hikashop Multisite
1 year 4 months ago #353735

-- url of the page with the problem -- : www.autovakshop.nl
-- HikaShop version -- : 4.7.4
-- Joomla version -- : 3.10.12
-- PHP version -- : 7.4.16
-- Browser(s) name and version -- : Firefox

In my webshop I made one variant product. In the case a save with several option.

ON the main page I fileld in all field with the product name and product number AVS-160

On the variant page I made the six variant with different prices and product numbers.

AVS160-100 €1895
AVS160-200 €2195
AVS160E-100 €2195
AVS160E-200 €2495
AVS160EN-100 €2250
AVS160EN-200 €2590

WHen I first visit the page I see as title: Sleutelkluis "GARAGESAFE PLUS" AVS160-100. The article number is behind the title because I set show code.

I made also a block with custom field that shows also the product number.There I only see AV160 (what was on the main page).

Whe I select a differnt variant, the title change to: Sleutelkluis "GARAGESAFE PLUS": Elektronisch cijfercodeslot 100 haken AVS160E-100
This line add suddely the varant name and the correct product number.

I my costume characterbox I lost the product number and the dahsed backgroudn that I had before.

Question:
1. How to change also the productnumber in the character box depending on the selected varait.
2. How to style if title line. I don't like the ways it is now formatted. I don';t need the productumber int hte title, but need to be in the lbottom bux with product specifiactions.
3. The variant title needs to be below the main ttitle. Not in a smaller can starting with a :

You can see the product on: www.autovakshop.nl/assortiment/product/avs160

Please advise.

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

  • Posts: 83007
  • Thank you received: 13400
  • MODERATOR
1 year 4 months ago #353744

Hi,

1. I'm not sure what you're refering to when you say "character box" ? The top area of the layout with the product name and the product code is updated each time with the new product code. And I don't see the product code displayed anywhere else on your page. So I don't know how to answer.

2. Edit the product / show_default view file via the menu Display>Views. There, you should have a view builder where you can drag & drop the elements around, including the product code. So it should be easy to position it where you want.

3. The variant name being smaller is done by custom CSS added in your template:
i.imgur.com/Km2AQ3i.png

.hikashop_product_variant_subname {
    font-size: 24px;
}
www.autovakshop.nl/templates/autovakshop_v2/css/custom.css

Replace that code by:
.hikashop_product_variant_subname {
      display: block;
}
and it will be the same size on a line below the main product name.

And to remove the ":" at the beginning of the variant name, you want to use a translation override on the translation key HIKA_VARIANT_SEPARATOR, like this:
HIKA_VARIANT_SEPARATOR=""
www.hikashop.com/download/languages.html#modify

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

  • Posts: 52
  • Thank you received: 4
  • Hikashop Multisite
1 year 4 months ago #353996

I understand what you are saying, but if you look at the picture, you see at the left part of image (the basic produc) with the correct articlenumbers on both position(number 1).

In the right part of the right part of the image I have have choosen an other instead of 100 haken now 200 haken. The title is changed and i see the artivle numer. But the specifiaction box I don't see the article number. (block 2).
Also the markup for the specificationbox is changed (3).

SO question: how can I get the article number on bothe places and how can I be sure that the specification box is not changed?

Attachments:

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

  • Posts: 83007
  • Thank you received: 13400
  • MODERATOR
1 year 4 months ago #354001

Hi,

Ok, I didn't see the product code in the specifications area.

So, here is what I can say about this product code in the specifications area:
- HikaShop doesn't display the product code in the specifications area by default
- This display has potentially been added thanks to a custom field of the table "product". In that case, you need to edit each variant of the product and properly fill the product code in that custom field. Otherwise, if a custom field is empty in the variant, HikaShop will automatically use the value of the parent.
- This display might have been added with some custom code in the product / show_block_dimensions via the menu Display>Views. This is fine for products without variants, but for products with variants, this view is only used for the default variant. For other variants, you need to do a similar modification in the product / show view file.

I suppose that you are in the second possibility. And thus, since we don't know what modification was made on your end to display the product code there, I'm not sure what exact code modification would be needed in product / show. The fact you're asking us about it might indicate that you're not the one who made the modification. It might be someone you hired to do it, or even your template provider. The best would be to notify the issue to the person who made the modification so that they can properly implement the change for variants too.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum