Skip to main content

Skip checkout Step

More
6 years 1 month ago #323305 by wavemaster
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.20
-- PHP version -- : 5.6.4
-- Browser(s) name and version -- : Chrome 84.0.4147.125

I've setup a custom order field on a specific product category. How do I hide or skip the Custom Fields step when product from that category is not selected.

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

More
6 years 1 month ago #323324 by Mohamed Thelji
Replied by Mohamed Thelji on topic Skip checkout Step
Hello,

You'll just have to restrict the displaying of your order custom fields to a category which will have every categories different than the one you don't want your order custom fields to show.

Kind regards,
Mohamed.

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

More
6 years 1 month ago #323347 by wavemaster
Replied by wavemaster on topic Skip checkout Step
Hi,

Thanks for the quick response, I think I missed this on my question. Would it be possible to hide the whole "Step" instead of hiding only the field?

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

More
6 years 1 month ago #323348 by nicolas
Replied by nicolas on topic Skip checkout Step
Hi,

There is no option for that. However, I think you can have the system auto skip the step with a small code modification.
Add the code:
Code:
public function haveEmptyContent(&$controller, &$params) { $checkoutHelper = hikashopCheckoutHelper::get(); $cart = $checkoutHelper->getCart(); if(empty($cart->order_fields)) return true; return false; }
in the file administrator/components/com_hikashop/helpers/checkout/fields.php before the line:
Code:
public function display(&$view, &$params) {
and that should do the trick.
Let us know how it goes so that we can include the modification in the next release.
The following user(s) said Thank You: wavemaster

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

More
6 years 1 month ago #323378 by wavemaster
Replied by wavemaster on topic Skip checkout Step
Worked like a charm! Thank you very much!

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

Time to create page: 0.244 seconds
Powered by Kunena Forum