New shipping method

  • Posts: 68
  • Thank you received: 3
1 month 2 weeks ago #359707

-- HikaShop version -- : 5.0.3
-- Joomla version -- : 5.0.2

I have 2 shipping methods at the moment: Both of them using the the Hikashop manual shipping method. One for collect in person, the other one is home delivery.
There are some products which is not available for delivery, so we blocked the home delivery option for these products. Works great.

Now I have to add one more courier option which will be exactly the same like the previouse home delivery option, just different price.
How can I block this new courier option for the products where the original courier is blocked already? There are abou 1000 products where this option should be block and I don't want to block it one by one.

Thanks

Last edit: 1 month 2 weeks ago by Petike1007.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 month 2 weeks ago #359709

Hi,

It's not possible to do it via the interfaces provided by HikaShop.
What you can you can do is to run a MySQL query via your PHPMyAdmin. Something like this:

INSERT INTO #__hikashop_shipping_price (shipping_id, shipping_price_ref_id, shipping_price_ref_type, shipping_price_min_quantity, shipping_price_value, shipping_fee_value, shipping_blocked) SELECT XX, shipping_price_ref_id, shipping_price_ref_type, shipping_price_min_quantity, shipping_price_value, shipping_fee_value, shipping_blocked FROM #__hikashop_shipping_price WHERE shipping_id = YY AND shipping_blocked = 1
where #__ is to be replaced with your tables prefix, XX with the id of the new courier shipping method, and YY with the id of the home delivery shipping method.
Note that this is not tested. I would recommend testing this first on a copy of the website.

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

  • Posts: 68
  • Thank you received: 3
1 month 2 days ago #360014

Just had time to try it...looks good for first sight. Thanks
Would be a great feature in the future to do it with 1 click.

The following user(s) said Thank You: nicolas

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

  • Posts: 68
  • Thank you received: 3
1 week 5 days ago #360364

Can you help me with one more query? Or maybe two.
So I have one more delivery method with id 21 which should be exactly the opposite of the id 2 delivery method. So where is id 2 blocked there will be id 21 available. If this helps, id 2 is blocked where the product custom field named "prescription" is set to "yes".

Also I need to block the existing id 1 method for the same products where id 2 is blocked.

At the moment I have a collect in person delivery method, which is payable with COD, wiretransfer or card, but I need to block the wiretransfer and card payments where prescription needed, but I didn't find any way for this just an another delivery method.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 week 5 days ago #360374

Hi,

This should add the new shipping price rules to block the shipping method with the id 21 for the products which don't have a blocking shipping price rule for the shipping method with the id 2:

INSERT INTO #__hikashop_shipping_price (shipping_id, shipping_price_ref_id, shipping_price_ref_type, shipping_price_min_quantity, shipping_price_value, shipping_fee_value, shipping_blocked) SELECT 21, product_id, 'product', 1, 0, 0, 1 FROM #__hikashop_product WHERE product_id NOT IN (SELECT shipping_price_ref_id FROM #__hikashop_shipping_price WHERE shipping_id = 2 AND shipping_blocked = 1)
As previously, note that this is not tested. I would recommend testing this first on a copy of the website.

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

  • Posts: 68
  • Thank you received: 3
1 week 4 days ago #360378

This one doesn't work unfortunately

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 week 4 days ago #360379

What error do you get ?

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

  • Posts: 68
  • Thank you received: 3
1 week 4 days ago #360384

No error, but it looks like it's not blocked/active where it should be

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 week 4 days ago #360386

Hi,

Then, I don't know why it wouldn't work.
It would require an access to the backend, and the PHPMyAdmin of the website. Also, please understand that we're outside normal user support here. If you want us to look into it, we'll have to charge for the time we spend.
If you're interested, please go through our contact form :
www.hikashop.com/support/contact-us.html

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

  • Posts: 68
  • Thank you received: 3
1 week 2 days ago #360430

I will try to have a look on a demo site first

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

Time to create page: 0.071 seconds
Powered by Kunena Forum