- Posts: 366
- Thank you received: 26
Override Cart Module Design
6 years 4 months ago #321425
by Thrane
Override Cart Module Design was created by Thrane
-- 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
-- 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.
6 years 4 months ago #321436
by nicolas
Replied by nicolas on topic Override Cart Module Design
Hi,
That span is added internally by HikaShop when generating the name of products with variants.
It's done with the line:
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.
That span is added internally by HikaShop when generating the name of products with variants.
It's done with the line:
Code:
$variant->product_name = $variant->main_product_name.'<span class="hikashop_product_variant_subname">'.$separator.$variant->characteristics_text.'</span>';
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.
6 years 4 months ago #321465
by Thrane
Replied by Thrane on topic Override Cart Module Design
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.
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.
6 years 4 months ago #321466
by Thrane
Replied by Thrane on topic Override Cart Module Design
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!
#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.
6 years 4 months ago - 6 years 4 months ago #321491
by Philip
Replied by Philip on topic Override Cart Module Design
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
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: 6 years 4 months ago by Philip.
Please Log in or Create an account to join the conversation.
Time to create page: 0.074 seconds