Customising Cart Module

  • Posts: 58
  • Thank you received: 2
10 years 4 weeks ago #211875

-- 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.

  • Posts: 58
  • Thank you received: 2
10 years 3 weeks ago #211878

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:

<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:
<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.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 3 weeks ago #211910

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

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 58
  • Thank you received: 2
10 years 3 weeks ago #211980

Many thanks :)

Last edit: 10 years 3 weeks ago by rcadmin.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum