Skip checkout Step

  • Posts: 5
  • Thank you received: 0
4 years 3 months ago #323305

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

  • Posts: 12953
  • Thank you received: 1778
4 years 2 months ago #323324

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.

  • Posts: 5
  • Thank you received: 0
4 years 2 months ago #323347

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 2 months ago #323348

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:

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

  • Posts: 5
  • Thank you received: 0
4 years 2 months ago #323378

Worked like a charm! Thank you very much!

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

Time to create page: 0.069 seconds
Powered by Kunena Forum