Skip to main content

Fail to remind the user to check T&C checkbox

8 years 5 months ago #293681 by FORIDA_LTD
-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.7.2
-- PHP version -- : 5.4.22
-- Browser(s) name and version -- : Chrome

Step 1: Cart
Step 2: Login + Address
Step 3: Cart + Terms and Conditions
Step 4: Payment + Coupon

During the check-out process, if user forgot to check the T&C checkbox, there is nothing to remind the user they must check the checkbox prior to do the payment. Also, it redirects user from step 3 back to step 1. Please advise. Thank you!

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

8 years 5 months ago #293689 by Jerome
Hi,

Your problem description make me think that you're using the legacy version of the checkout.
www.hikashop.com/support/documentation/5...html#advanced_legacy

Regards,

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

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

8 years 5 months ago #293910 by FORIDA_LTD
Hi Jerome,

I updated the setting for the Checkout Legacy and it did work, Thanks!
However, when I apply the following code to have a onchange for the cart view at checkout, either one does not work anymore according to the change of checkout legacy.

Code used:
www.hikashop.com/support/forum/checkout/...-next-on-addres.html

In the file "cart" of the view "checkout" via the menu Display>Views
Code:
echo JHTML::_('select.genericlist', $values, 'item['.$row->cart_product_id.']', '', 'value', 'text', $row->cart_product_quantity,'hikashop_checkout_quantity_'.$row->cart_product_id);
to:
Code:
echo JHTML::_('select.genericlist', $values, 'item['.$row->cart_product_id.']', 'onchange="this.form.submit();"', 'value', 'text', $row->cart_product_quantity,'hikashop_checkout_quantity_'.$row->cart_product_id);

Current situation:
1. When checkout legacy is "YES", the T&C reminder works fine but the onchange cart view is no longer available
2. When checkout legacy is "NO", the T&C reminder simply show in plain text (please see attached) and the onchange cart view works fine

Can i have a solution for both the proper T&C reminder (and I would like to change the reminder box to red, please advise) and the onchange cart view together?

Many Thanks!

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

8 years 5 months ago #293950 by nicolas
Hi,

With the new checkout, the "cart" file of the view "checkout" is not used anymore. It's the file "show_block_cart" which is used instead.
However, there is no need to change show_block_cart anymore to auto submit the change of the quantity when the quantity input is displayed as a dropdown. That's already the case by default:
Code:
$onchange = 'onchange="window.hikashop.checkQuantity(this); var qty_field = document.getElementById(\'hikashop_checkout_quantity_'.$product->cart_product_id.'\'); if (qty_field && qty_field.value != \''.$product->cart_product_quantity.'\'){'.$input.'return window.checkout.submitCart('.$this->step.','.$this->module_position.'); } return false;"'; $ret = JHTML::_('select.genericlist', $values, 'checkout[cart][item]['.$product->cart_product_id.']', 'id="hikashop_checkout_quantity_'.$product->cart_product_id.'" data-hk-qty-old="'. $product->cart_product_quantity.'" '.$onchange, 'value', 'text', $product->cart_product_quantity); echo str_replace('id="checkoutcartitem'.$product->cart_product_id.'"', '', $ret);

The solution with the chekcout legacy turned off is the way to go.
The issue with the error message displaying in plain text is simply a CSS issue either coming from your template or because you're using a really old CSS of HikaShop that you've customized. Check the "frontend CSS file" option of the HikaShop configuration and check that it is set to "default". The error message should then display properly. If not please provide a link to the shop along with instructions to reproduce the issue.

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

Time to create page: 0.053 seconds
Powered by Kunena Forum