Override Cart Module Design

  • Posts: 357
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
3 years 9 months 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: 81509
  • Thank you received: 13064
  • MODERATOR
3 years 9 months 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: 357
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
3 years 9 months 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: 357
  • Thank you received: 24
  • Hikaserial Standard Hikashop Business
3 years 9 months 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: 4508
  • Thank you received: 610
  • MODERATOR
3 years 9 months 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: 3 years 9 months ago by Philip.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum