Skip to main content

Customising Cart Module

More
11 years 1 month ago #211875 by rcadmin
-- HikaShop version -- : 2.5.0

I am wanting to remove the custom fields from appearing in the cart module. If I use css as discussed in other posts I then loose them in the checkout which I don't want. I thought I could do it by customising the views but I can't work out which one it is.

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

More
11 years 1 month ago #211878 by rcadmin
Replied by rcadmin on topic Customising Cart Module
I added a module class suffix to the cart to use it with hikashop_cart_product_custom_item_fields but only the first item was removed.

I looked at the generated code and noticed what looked like a problem:
Code:
<td class="hikashop_cart_module_product_name_value hikashop_cart_value"><a href="/community/shop/product/2-hockey-event" > Hockey Event </a> <p class="hikashop_cart_product_custom_item_fields"> <p class="hikashop_cart_item_surname_itm"> <label for="surname_itm">Surname</label> : Smith</p> <p class="hikashop_cart_item_firstname_item"> <label for="firstname_item">First name</label> : Fred</p> <p class="hikashop_cart_item_class_itm"> <label for="class_itm">Form Class</label> : 2334</p> </p></td>

Look the the following:
Code:
<p class="hikashop_cart_product_custom_item_fields"> <p class="hikashop_cart_item_surnam ...

There appears to be nested P tages that seem wrong to me.

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

More
11 years 1 month ago #211910 by Jerome
Replied by Jerome on topic Customising Cart Module
Hi,

Yes ; there is nested P but there is one single parent : "hikashop_cart_product_custom_item_fields".
You can take a look into the view "product / cart" (which is the view which generate the module content) ; you will see that code
Code:
if(!empty($html)){ echo '<p class="hikashop_cart_product_custom_item_fields">'.$html.'</p>'; }
$html is the variable which contain the content of the item custom field for the item. If you remove/comment these 3 lines, the item custom won't be displayed anymore in the page.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 1 month ago - 11 years 1 month ago #211980 by rcadmin
Replied by rcadmin on topic Customising Cart Module
Many thanks :)
Last edit: 11 years 1 month ago by rcadmin.

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

Time to create page: 0.152 seconds
Powered by Kunena Forum