Override Cart Module Design

  • Posts: 56
  • Thank you received: 5
  • Hikashop Business
2 weeks 1 day ago #321425

-- url of the page with the problem -- : muggep.thr.nu/kurv
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3.19
-- Browser(s) name and version -- : FireFox

Hi

I have bought the Cart Module Design in Market, but I have issues with the override - in the file cart_design_view.php I don't see the <span> with the class "hikashop_product_variant_subname" - where can I find it?

Regards
Thomas

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

  • Posts: 70022
  • Thank you received: 10487
  • MODERATOR
2 weeks 1 day ago #321436

Hi,

That span is added internally by HikaShop when generating the name of products with variants.
It's done with the line:

$variant->product_name = $variant->main_product_name.'<span class="hikashop_product_variant_subname">'.$separator.$variant->characteristics_text.'</span>';
in administrator/components/com_hikashop/classes/product.php
Now please beware that it is used on the product page, on the cart in the checkout, etc. It's not just in the cart module.
Also, if you change that code, when you update your HikaShop the code will revert back to what we have on our end.
As I don't know what you're trying to do, I can't say what should be the best way to move forward.

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

  • Posts: 56
  • Thank you received: 5
  • Hikashop Business
2 weeks 1 day ago #321465

Hi
And thanks!

I see ... I would just like to have the variant name on its own line (and no ':'), and be able to style the main productname and variant name differently.

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

  • Posts: 56
  • Thank you received: 5
  • Hikashop Business
2 weeks 1 day ago #321466

I have done it with CSS now :-)

#hikashop_checkout .hikashop_product_variant_subname::before {
content: "\A";
white-space: pre;
}
Now I just have to figure out how to get rid of ':' + the space after it!

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

  • Posts: 2591
  • Thank you received: 341
  • MODERATOR
2 weeks 1 day ago #321491

Hi,

For modify this specific part, just a mdofification in language file can do the trick :
HIKA_VARIANT_SEPARATOR="<br/>"

Note : See this documentation to see how to proceed.

Hope this will help you to achieved what you need.
Regards

Last edit: 2 weeks 1 day ago by Philip.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum