Force shipping for virtual / weightless items

  • Posts: 42
  • Thank you received: 1
3 months 4 weeks ago #347138

Have turned off the setting Force shipping for virtual / weightless items, but I faced following problems, for this item I did not set for the weight, the shipping method will not be displayed, but the shipping step still showing. Any way to turn off the shipping step when there is no shipping method?


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

  • Posts: 78303
  • Thank you received: 12368
3 months 4 weeks ago #347144


There is no mechanism to remove a step. That's because the system doesn't what is in each step unless it displays it, and it only displays the current step.
However, there is a mechanism to automatically skip empty steps.
It is implemented for the "login" view from example. If you're already logged in, and you login have the login view alone on a step, if you try to access that step, it will automatically redirect you to the next one.
However, that mechanism hasn't been implemented for the shipping view. To do that, add the code:

public function haveEmptyContent(&$controller, &$params) {
		$checkoutHelper = hikashopCheckoutHelper::get();
			return true;
		return false;
before the line:
public function validate(&$controller, &$params, $data = array()) {
in the file administrator/components/com_hikashop/helpers/checkout/shipping.php
Please let us know how it goes so that we can validate the changes for the next release of HikaShop.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum