- Posts: 9
- Thank you received: 1
Remove custom fields from cart module
- iceandfireski
-
Topic Author
- Offline
Less
More
12 years 3 months ago #164987
by iceandfireski
Remove custom fields from cart module was created by iceandfireski
-- url of the page with the problem -- :
mywebsite.com/mypage
-- HikaShop version -- : HikaShop Business: 2.3.2
-- Joomla version -- : Joomla! 2.5.10
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hi, firstly thank you for such a great product I am still getting used to the huge amount of customization available but am impressed so far!
I have set up a menu item in joomla displaying the categories from the shop and have assigned modules to the side for cart, categories, currency etc.
I have also set up some custom fields in the products for customers to enter information - this all works fine.
The problem I have is that the information from the custom fields gets shown in the cart which makes it a very long and messy cart.
I have tried the mini cart and that is not a solution as the customer needs to be able to see the following:
Item name
quantity
I have a couple of questions please:
1. Is there a way of removing the custom fields from the cart module?
2. There also does not appear to be a refresh on the cart module - have I missed a setting somewhere?
3. When going through the checkout process all of the modules that were assigned to the shop menu appear all the way through - is there a way of stopping them from showing ie on the registration and payment pages you still have all the modules from the main shop page.
Once again thanks for a great product and apologies if some of the answers are already on the forum, I did have a good look - promise
-- HikaShop version -- : HikaShop Business: 2.3.2
-- Joomla version -- : Joomla! 2.5.10
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hi, firstly thank you for such a great product I am still getting used to the huge amount of customization available but am impressed so far!
I have set up a menu item in joomla displaying the categories from the shop and have assigned modules to the side for cart, categories, currency etc.
I have also set up some custom fields in the products for customers to enter information - this all works fine.
The problem I have is that the information from the custom fields gets shown in the cart which makes it a very long and messy cart.
I have tried the mini cart and that is not a solution as the customer needs to be able to see the following:
Item name
quantity
I have a couple of questions please:
1. Is there a way of removing the custom fields from the cart module?
2. There also does not appear to be a refresh on the cart module - have I missed a setting somewhere?
3. When going through the checkout process all of the modules that were assigned to the shop menu appear all the way through - is there a way of stopping them from showing ie on the registration and payment pages you still have all the modules from the main shop page.
Once again thanks for a great product and apologies if some of the answers are already on the forum, I did have a good look - promise
Please Log in or Create an account to join the conversation.
12 years 3 months ago #164990
by Xavier
Replied by Xavier on topic Remove custom fields from cart module
Hi,
1. You will have to edit the view "product / cart" and remove the desired part.
2. No refresh buttons are available, the customer only have to set a different quantity and the cart will be refreshed automatically.
3. You have to create a menu without these modules associated. Then in Configuration > Checkout > Force a menu on checkout, select the previously created menu.
1. You will have to edit the view "product / cart" and remove the desired part.
2. No refresh buttons are available, the customer only have to set a different quantity and the cart will be refreshed automatically.
3. You have to create a menu without these modules associated. Then in Configuration > Checkout > Force a menu on checkout, select the previously created menu.
The following user(s) said Thank You: iceandfireski
Please Log in or Create an account to join the conversation.
- iceandfireski
-
Topic Author
- Offline
Less
More
- Posts: 9
- Thank you received: 1
12 years 3 months ago #165260
by iceandfireski
Replied by iceandfireski on topic Remove custom fields from cart module
Hi Xavier,
Thank you for the reply, I have sorted the modules in the checkout process - all good!
With the custom fields in the cart module I have found the view and think I have found the part that needs removing but I am no PHP expert and could do with a bit of help please.
This is the code from the view cart:
$input='';
if($group){
foreach($this->rows as $j => $optionElement){
if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
echo '<p class="hikashop_cart_option_name">'. $optionElement->product_name.'</p>';
$input .='document.getElementById(\'cart_product_option_'.$optionElement->cart_product_id.'\').value=qty_field.value;';
echo '<input type="hidden" id="cart_product_option_'.$optionElement->cart_product_id.'" name="item[cart_product_quantity]" value="'.$row->cart_product_quantity.'"/>';
}
}
$html = ob_get_clean();
if(!empty($html)){
echo '<p class="hikashop_cart_product_custom_item_fields">'.$html.'</p>';
}
?>
</td>
<?php
}
if($group){
foreach($this->rows as $j => $optionElement){
if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
if(!empty($optionElement->prices[0])){
if(!isset($row->prices[0])){
$row->prices[0]->price_value=0;
$row->prices[0]->price_value_with_tax=0;
$row->prices[0]->price_currency_id = hikashop_getCurrency();
Could you possibly reply back with part that needs to be removed to take out the custom fields from the cart
Many thanks
Andy
Thank you for the reply, I have sorted the modules in the checkout process - all good!
With the custom fields in the cart module I have found the view and think I have found the part that needs removing but I am no PHP expert and could do with a bit of help please.
This is the code from the view cart:
$input='';
if($group){
foreach($this->rows as $j => $optionElement){
if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
echo '<p class="hikashop_cart_option_name">'. $optionElement->product_name.'</p>';
$input .='document.getElementById(\'cart_product_option_'.$optionElement->cart_product_id.'\').value=qty_field.value;';
echo '<input type="hidden" id="cart_product_option_'.$optionElement->cart_product_id.'" name="item[cart_product_quantity]" value="'.$row->cart_product_quantity.'"/>';
}
}
$html = ob_get_clean();
if(!empty($html)){
echo '<p class="hikashop_cart_product_custom_item_fields">'.$html.'</p>';
}
?>
</td>
<?php
}
if($group){
foreach($this->rows as $j => $optionElement){
if($optionElement->cart_product_option_parent_id != $row->cart_product_id) continue;
if(!empty($optionElement->prices[0])){
if(!isset($row->prices[0])){
$row->prices[0]->price_value=0;
$row->prices[0]->price_value_with_tax=0;
$row->prices[0]->price_currency_id = hikashop_getCurrency();
Could you possibly reply back with part that needs to be removed to take out the custom fields from the cart
Many thanks
Andy
Please Log in or Create an account to join the conversation.
12 years 3 months ago #165317
by nicolas
Replied by nicolas on topic Remove custom fields from cart module
Hi,
You don't need to remove any code.
Just add such CSS on your website:
.hikashop_cart_product_custom_item_fields{display:none; }
You don't need to remove any code.
Just add such CSS on your website:
.hikashop_cart_product_custom_item_fields{display:none; }
Please Log in or Create an account to join the conversation.
12 years 6 days ago - 12 years 6 days ago #178639
by dzshanno
Replied by dzshanno on topic Remove custom fields from cart module
Thanks this was very helpful in pointing me in the right direction but having tried to use the code suggested I think I can add some more info
There appears to be a bug in the way hikashop builds the cart module classes.
On its own I found hikashop_cart_product_custom_item_fields{display:none; } only removes the custom fields from the checkout screen not the cart module.
The .hikashop_cart_product_custom_item_fields class appears not to be applied to the actual custom fields in the cart module but is in the checkout screen.
As a fix you can apply the {display:none;} to each of the custom fields
e.g. .hikashop_cart_item_date_of_birth{display: none;}
If you only want to hide them in the cart module and not the checkout screen you can use
.hikashop_cart_module .hikashop_cart_item_date_of_birth{display: none;}
There appears to be a bug in the way hikashop builds the cart module classes.
On its own I found hikashop_cart_product_custom_item_fields{display:none; } only removes the custom fields from the checkout screen not the cart module.
The .hikashop_cart_product_custom_item_fields class appears not to be applied to the actual custom fields in the cart module but is in the checkout screen.
As a fix you can apply the {display:none;} to each of the custom fields
e.g. .hikashop_cart_item_date_of_birth{display: none;}
If you only want to hide them in the cart module and not the checkout screen you can use
.hikashop_cart_module .hikashop_cart_item_date_of_birth{display: none;}
Last edit: 12 years 6 days ago by dzshanno. Reason: sense
The following user(s) said Thank You: Xavier
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds