[Skip to main content](#vessel-content)

#   Strange behaviour with blocked Price per Product shipping methods

##

- **[dr445](/forum/user/58220-dr445 "View dr445's Profile")**
- [![dr445's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58220-dr445 "View dr445's Profile") Topic Author
- [ Offline](/forum/user/58220-dr445)

Less More

- Posts: 3
- Thank you received: 0
-
-

7 years 1 month ago [\#311422](#311422) by [dr445](/forum/user/58220-dr445 "View dr445's Profile")  *[Strange behaviour with blocked Price per Product shipping methods](/forum/28-shipping-methods/898374-strange-behaviour-with-blocked-price-per-product-shipping-methods#311422 "-- url of the page with the problem -- :   joomla.evocat.net/test-components/wineshop/wineshop/  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.12 -- PHP version -- : 7.2.16 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Hello  (Running hikashop business 4.2.1 under joomla 3.9.12)  I've found a couple of apparent issues with &quot;Blocked&quot; shipping prices for products (which I am using to restrict purchase of some products to UK-only shipping addresses).  (I have set up a simple test site at   joomla.evocat.net/test-components/wineshop/wineshop/  to show these issues.)  A. If the product has variants, and if the &quot;parent&quot; product has shipping blocked to non-UK addresses, I get weird behaviour if we have a non-UK address and the product is selected (namely &quot;Add to cart&quot; buttons on the product listing page no longer apparently do anything).  Steps to reproduce: 1. Go to above site 2. &quot;Choose options&quot; for &quot;Wine&quot; product (this product has variants, and has shipping to UK only) 3. &quot;Add to cart&quot; 4. Proceed to checkout 5. Enter Guest details (with a NON-UK Country) 6. Select &quot;Next&quot; (at this point the checkout page shows php Notices re line 194 of /administrator/components/com&#95;hikashop/helpers/shippingplugin.php -- see note at end) 7. Return to &quot;Shop&quot; (top menu) (cart module on right of page shows same php Notices) 8. Try to add to Cart any item eg Wine Glasses. (&#42;&#42;&#42; the cart module is not responsive to any additions &#42;&#42;&#42;, although they are actually added to the cart, as seen by proceeding to the checkout)  B. If a product is bought that has shipping blocked, and also a virtual product is bought, I get a weird error message eg &quot;No shipping method found for the warehouse : 2&quot;  Steps to reproduce: 1. Go to above site with an empty cart 2. &quot;Add to cart&quot; for Wine Glasses (which has shipping to UK only) 3. Proceed to checkout 4. Enter Guest details (with a NON-UK Country) 5. Select &quot;Next&quot; 6. Return to &quot;Shop&quot; (top menu) 7. &quot;Add to cart&quot; for the Wine Leaflet (which is a virtual product) 8. &quot;Proceed to checkout&quot; 9. Get strange error: &quot;No shipping method found for the warehouse : 2&quot; (I don't have a warehouse &quot;2&quot;)  I'm probably doing something stupid, but perhaps you could double-check this behaviour. I can give backend access to the site above if needed.  Thanks, David  ----- The php notices from step A6 are:  Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194")* was created by *[dr445](/forum/user/58220-dr445 "View dr445's Profile")*

-- url of the page with the problem -- : [ joomla.evocat.net/test-components/wineshop/wineshop/](https://joomla.evocat.net/test-components/wineshop/wineshop/)
-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.12
-- PHP version -- : 7.2.16
-- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com_hikashop/helpers/shippingplugin.php on line 194

Notice: Trying to get property 'product_name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com_hikashop/helpers/shippingplugin.php on line 194

Hello

(Running hikashop business 4.2.1 under joomla 3.9.12)

I've found a couple of apparent issues with "Blocked" shipping prices for products (which I am using to restrict purchase of some products to UK-only shipping addresses).

(I have set up a simple test site at [ joomla.evocat.net/test-components/wineshop/wineshop/](https://joomla.evocat.net/test-components/wineshop/wineshop/) to show these issues.)

A. If the product has variants, and if the "parent" product has shipping blocked to non-UK addresses, I get weird behaviour if we have a non-UK address and the product is selected (namely "Add to cart" buttons on the product listing page no longer apparently do anything).

Steps to reproduce:
1. Go to above site
2. "Choose options" for "Wine" product (this product has variants, and has shipping to UK only)
3. "Add to cart"
4. Proceed to checkout
5. Enter Guest details (with a NON-UK Country)
6. Select "Next"
(at this point the checkout page shows php Notices re line 194 of /administrator/components/com_hikashop/helpers/shippingplugin.php -- see note at end)
7. Return to "Shop" (top menu)
(cart module on right of page shows same php Notices)
8. Try to add to Cart any item eg Wine Glasses.
(*** the cart module is not responsive to any additions ***, although they are actually added to the cart, as seen by proceeding to the checkout)

B. If a product is bought that has shipping blocked, and also a virtual product is bought, I get a weird error message eg "No shipping method found for the warehouse : 2"

Steps to reproduce:
1. Go to above site with an empty cart
2. "Add to cart" for Wine Glasses (which has shipping to UK only)
3. Proceed to checkout
4. Enter Guest details (with a NON-UK Country)
5. Select "Next"
6. Return to "Shop" (top menu)
7. "Add to cart" for the Wine Leaflet (which is a virtual product)
8. "Proceed to checkout"
9. Get strange error: "No shipping method found for the warehouse : 2"
(I don't have a warehouse "2")

I'm probably doing something stupid, but perhaps you could double-check this behaviour. I can give backend access to the site above if needed.

Thanks,
David

---

The php notices from step A6 are:

Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com_hikashop/helpers/shippingplugin.php on line 194

Notice: Trying to get property 'product_name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com_hikashop/helpers/shippingplugin.php on line 194

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODk4Mzc0LXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtYmxvY2tlZC1wcmljZS1wZXItcHJvZHVjdC1zaGlwcGluZy1tZXRob2RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

7 years 1 month ago [\#311453](#311453) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Strange behaviour with blocked Price per Product shipping methods](/forum/28-shipping-methods/898374-strange-behaviour-with-blocked-price-per-product-shipping-methods#311453 "-- url of the page with the problem -- :   joomla.evocat.net/test-components/wineshop/wineshop/  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.12 -- PHP version -- : 7.2.16 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Hello  (Running hikashop business 4.2.1 under joomla 3.9.12)  I've found a couple of apparent issues with &quot;Blocked&quot; shipping prices for products (which I am using to restrict purchase of some products to UK-only shipping addresses).  (I have set up a simple test site at   joomla.evocat.net/test-components/wineshop/wineshop/  to show these issues.)  A. If the product has variants, and if the &quot;parent&quot; product has shipping blocked to non-UK addresses, I get weird behaviour if we have a non-UK address and the product is selected (namely &quot;Add to cart&quot; buttons on the product listing page no longer apparently do anything).  Steps to reproduce: 1. Go to above site 2. &quot;Choose options&quot; for &quot;Wine&quot; product (this product has variants, and has shipping to UK only) 3. &quot;Add to cart&quot; 4. Proceed to checkout 5. Enter Guest details (with a NON-UK Country) 6. Select &quot;Next&quot; (at this point the checkout page shows php Notices re line 194 of /administrator/components/com&#95;hikashop/helpers/shippingplugin.php -- see note at end) 7. Return to &quot;Shop&quot; (top menu) (cart module on right of page shows same php Notices) 8. Try to add to Cart any item eg Wine Glasses. (&#42;&#42;&#42; the cart module is not responsive to any additions &#42;&#42;&#42;, although they are actually added to the cart, as seen by proceeding to the checkout)  B. If a product is bought that has shipping blocked, and also a virtual product is bought, I get a weird error message eg &quot;No shipping method found for the warehouse : 2&quot;  Steps to reproduce: 1. Go to above site with an empty cart 2. &quot;Add to cart&quot; for Wine Glasses (which has shipping to UK only) 3. Proceed to checkout 4. Enter Guest details (with a NON-UK Country) 5. Select &quot;Next&quot; 6. Return to &quot;Shop&quot; (top menu) 7. &quot;Add to cart&quot; for the Wine Leaflet (which is a virtual product) 8. &quot;Proceed to checkout&quot; 9. Get strange error: &quot;No shipping method found for the warehouse : 2&quot; (I don't have a warehouse &quot;2&quot;)  I'm probably doing something stupid, but perhaps you could double-check this behaviour. I can give backend access to the site above if needed.  Thanks, David  ----- The php notices from step A6 are:  Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194")*

Hello,

1. Thank you for your feedback, we'll try to reproduce and fix it on our end. Also, If you're only having "notice" and no warning messages it won't affect your shop.
Note that when your shop is in production mode you should :
- Disable the Joomla debug mode ("Administration-&gt;Global configuration-&gt;System-&gt;Debug System/Language")
- Set the "error reporting" option of the Joomla configuration to "none"

2. That issue is coming from the fact that you used the "Warehouse" option through your product configuration page or shipping method configuration page. So you should unset it if you don't want to use warehouses.

We wish you a nice day !
Kind regards,
Mohamed Thelji.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODk4Mzc0LXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtYmxvY2tlZC1wcmljZS1wZXItcHJvZHVjdC1zaGlwcGluZy1tZXRob2RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[dr445](/forum/user/58220-dr445 "View dr445's Profile")**
- [![dr445's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58220-dr445 "View dr445's Profile") Topic Author
- [ Offline](/forum/user/58220-dr445)

Less More

- Posts: 3
- Thank you received: 0
-
-

7 years 1 month ago [\#311952](#311952) by [dr445](/forum/user/58220-dr445 "View dr445's Profile")  Replied by *[dr445](/forum/user/58220-dr445 "View dr445's Profile")* on topic *[Strange behaviour with blocked Price per Product shipping methods](/forum/28-shipping-methods/898374-strange-behaviour-with-blocked-price-per-product-shipping-methods#311952 "-- url of the page with the problem -- :   joomla.evocat.net/test-components/wineshop/wineshop/  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.12 -- PHP version -- : 7.2.16 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Hello  (Running hikashop business 4.2.1 under joomla 3.9.12)  I've found a couple of apparent issues with &quot;Blocked&quot; shipping prices for products (which I am using to restrict purchase of some products to UK-only shipping addresses).  (I have set up a simple test site at   joomla.evocat.net/test-components/wineshop/wineshop/  to show these issues.)  A. If the product has variants, and if the &quot;parent&quot; product has shipping blocked to non-UK addresses, I get weird behaviour if we have a non-UK address and the product is selected (namely &quot;Add to cart&quot; buttons on the product listing page no longer apparently do anything).  Steps to reproduce: 1. Go to above site 2. &quot;Choose options&quot; for &quot;Wine&quot; product (this product has variants, and has shipping to UK only) 3. &quot;Add to cart&quot; 4. Proceed to checkout 5. Enter Guest details (with a NON-UK Country) 6. Select &quot;Next&quot; (at this point the checkout page shows php Notices re line 194 of /administrator/components/com&#95;hikashop/helpers/shippingplugin.php -- see note at end) 7. Return to &quot;Shop&quot; (top menu) (cart module on right of page shows same php Notices) 8. Try to add to Cart any item eg Wine Glasses. (&#42;&#42;&#42; the cart module is not responsive to any additions &#42;&#42;&#42;, although they are actually added to the cart, as seen by proceeding to the checkout)  B. If a product is bought that has shipping blocked, and also a virtual product is bought, I get a weird error message eg &quot;No shipping method found for the warehouse : 2&quot;  Steps to reproduce: 1. Go to above site with an empty cart 2. &quot;Add to cart&quot; for Wine Glasses (which has shipping to UK only) 3. Proceed to checkout 4. Enter Guest details (with a NON-UK Country) 5. Select &quot;Next&quot; 6. Return to &quot;Shop&quot; (top menu) 7. &quot;Add to cart&quot; for the Wine Leaflet (which is a virtual product) 8. &quot;Proceed to checkout&quot; 9. Get strange error: &quot;No shipping method found for the warehouse : 2&quot; (I don't have a warehouse &quot;2&quot;)  I'm probably doing something stupid, but perhaps you could double-check this behaviour. I can give backend access to the site above if needed.  Thanks, David  ----- The php notices from step A6 are:  Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194")*

Hello

Thanks for your reply, but

1. My problem isn't that I don't know how to suppress php notices (I reported the notices as it suggests a problem with the code that is probably related to my issue). My problem is that the hikashop cart module does not reflect buying a product in the situation I outlined.

2. I need to use Warehouses, so unfortunately I cannot follow your suggestion.

I would be great if a fix could be found for these issues. As it stands hikashop is of no use to me.

Thanks,
David

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODk4Mzc0LXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtYmxvY2tlZC1wcmljZS1wZXItcHJvZHVjdC1zaGlwcGluZy1tZXRob2RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

7 years 1 month ago -  7 years 1 month ago [\#311968](#311968) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Strange behaviour with blocked Price per Product shipping methods](/forum/28-shipping-methods/898374-strange-behaviour-with-blocked-price-per-product-shipping-methods#311968 "-- url of the page with the problem -- :   joomla.evocat.net/test-components/wineshop/wineshop/  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.12 -- PHP version -- : 7.2.16 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Hello  (Running hikashop business 4.2.1 under joomla 3.9.12)  I've found a couple of apparent issues with &quot;Blocked&quot; shipping prices for products (which I am using to restrict purchase of some products to UK-only shipping addresses).  (I have set up a simple test site at   joomla.evocat.net/test-components/wineshop/wineshop/  to show these issues.)  A. If the product has variants, and if the &quot;parent&quot; product has shipping blocked to non-UK addresses, I get weird behaviour if we have a non-UK address and the product is selected (namely &quot;Add to cart&quot; buttons on the product listing page no longer apparently do anything).  Steps to reproduce: 1. Go to above site 2. &quot;Choose options&quot; for &quot;Wine&quot; product (this product has variants, and has shipping to UK only) 3. &quot;Add to cart&quot; 4. Proceed to checkout 5. Enter Guest details (with a NON-UK Country) 6. Select &quot;Next&quot; (at this point the checkout page shows php Notices re line 194 of /administrator/components/com&#95;hikashop/helpers/shippingplugin.php -- see note at end) 7. Return to &quot;Shop&quot; (top menu) (cart module on right of page shows same php Notices) 8. Try to add to Cart any item eg Wine Glasses. (&#42;&#42;&#42; the cart module is not responsive to any additions &#42;&#42;&#42;, although they are actually added to the cart, as seen by proceeding to the checkout)  B. If a product is bought that has shipping blocked, and also a virtual product is bought, I get a weird error message eg &quot;No shipping method found for the warehouse : 2&quot;  Steps to reproduce: 1. Go to above site with an empty cart 2. &quot;Add to cart&quot; for Wine Glasses (which has shipping to UK only) 3. Proceed to checkout 4. Enter Guest details (with a NON-UK Country) 5. Select &quot;Next&quot; 6. Return to &quot;Shop&quot; (top menu) 7. &quot;Add to cart&quot; for the Wine Leaflet (which is a virtual product) 8. &quot;Proceed to checkout&quot; 9. Get strange error: &quot;No shipping method found for the warehouse : 2&quot; (I don't have a warehouse &quot;2&quot;)  I'm probably doing something stupid, but perhaps you could double-check this behaviour. I can give backend access to the site above if needed.  Thanks, David  ----- The php notices from step A6 are:  Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194")*

Hello David,

Can you show us how you configured your 2 products and shipping methods through some screenshots so that we can directly test it on our end ? Thank you.

Kind regards,
Mohamed Thelji.

Last edit: 7 years 1 month ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODk4Mzc0LXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtYmxvY2tlZC1wcmljZS1wZXItcHJvZHVjdC1zaGlwcGluZy1tZXRob2RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[dr445](/forum/user/58220-dr445 "View dr445's Profile")**
- [![dr445's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58220-dr445 "View dr445's Profile") Topic Author
- [ Offline](/forum/user/58220-dr445)

Less More

- Posts: 3
- Thank you received: 0
-
-

7 years 1 month ago [\#312050](#312050) by [dr445](/forum/user/58220-dr445 "View dr445's Profile")  Replied by *[dr445](/forum/user/58220-dr445 "View dr445's Profile")* on topic *[Strange behaviour with blocked Price per Product shipping methods](/forum/28-shipping-methods/898374-strange-behaviour-with-blocked-price-per-product-shipping-methods#312050 "-- url of the page with the problem -- :   joomla.evocat.net/test-components/wineshop/wineshop/  -- HikaShop version -- : 4.2.1 -- Joomla version -- : 3.9.12 -- PHP version -- : 7.2.16 -- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Hello  (Running hikashop business 4.2.1 under joomla 3.9.12)  I've found a couple of apparent issues with &quot;Blocked&quot; shipping prices for products (which I am using to restrict purchase of some products to UK-only shipping addresses).  (I have set up a simple test site at   joomla.evocat.net/test-components/wineshop/wineshop/  to show these issues.)  A. If the product has variants, and if the &quot;parent&quot; product has shipping blocked to non-UK addresses, I get weird behaviour if we have a non-UK address and the product is selected (namely &quot;Add to cart&quot; buttons on the product listing page no longer apparently do anything).  Steps to reproduce: 1. Go to above site 2. &quot;Choose options&quot; for &quot;Wine&quot; product (this product has variants, and has shipping to UK only) 3. &quot;Add to cart&quot; 4. Proceed to checkout 5. Enter Guest details (with a NON-UK Country) 6. Select &quot;Next&quot; (at this point the checkout page shows php Notices re line 194 of /administrator/components/com&#95;hikashop/helpers/shippingplugin.php -- see note at end) 7. Return to &quot;Shop&quot; (top menu) (cart module on right of page shows same php Notices) 8. Try to add to Cart any item eg Wine Glasses. (&#42;&#42;&#42; the cart module is not responsive to any additions &#42;&#42;&#42;, although they are actually added to the cart, as seen by proceeding to the checkout)  B. If a product is bought that has shipping blocked, and also a virtual product is bought, I get a weird error message eg &quot;No shipping method found for the warehouse : 2&quot;  Steps to reproduce: 1. Go to above site with an empty cart 2. &quot;Add to cart&quot; for Wine Glasses (which has shipping to UK only) 3. Proceed to checkout 4. Enter Guest details (with a NON-UK Country) 5. Select &quot;Next&quot; 6. Return to &quot;Shop&quot; (top menu) 7. &quot;Add to cart&quot; for the Wine Leaflet (which is a virtual product) 8. &quot;Proceed to checkout&quot; 9. Get strange error: &quot;No shipping method found for the warehouse : 2&quot; (I don't have a warehouse &quot;2&quot;)  I'm probably doing something stupid, but perhaps you could double-check this behaviour. I can give backend access to the site above if needed.  Thanks, David  ----- The php notices from step A6 are:  Notice: Undefined index: p5 in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194  Notice: Trying to get property 'product&#95;name' of non-object in /var/www/joomla/sites/development/test-components/wineshop/wineshop/administrator/components/com&#95;hikashop/helpers/shippingplugin.php on line 194")*

Hello. Rather than waste time doing screenshots (although I did offer you backend access to the test site), I had a peek at the hikashop code (particularly where the php notices were coming from).

1. (Re the hikashop cart module being unresponsive to purchases if a product with variants has its shipping blocked)

I tried out the following patch:

---

Code:

diff --git a/mysite.com/administrator/components/com_hikashop/helpers/shippingplugin.php b/mysite.com/administrator/components/com_hikashop/helpers/shippingplugin.php index 4293a10..bc65982 100644 --- a/mysite.com/administrator/components/com_hikashop/helpers/shippingplugin.php +++ b/mysite.com/administrator/components/com_hikashop/helpers/shippingplugin.php @@ -180,6 +180,11 @@ class hikashopShippingPlugin extends hikashopPlugin { $price = 0; $rate_prices['products']['product_names'] = array(); foreach($order-&gt;products as $k =&gt; $row) { + + if (substr($k,0,1) === 'p') { // don't check a parent product directly -- we check it via its variant if appropriate + continue; + } + if(!empty($rate-&gt;products) &amp;&amp; !in_array($row-&gt;product_id, $rate-&gt;products)) continue; @@ -191,7 +196,7 @@ class hikashopShippingPlugin extends hikashopPlugin { } elseif(isset($rate_prices['products'][$row-&gt;product_parent_id])) { $price += $rate_prices['products'][$row-&gt;product_parent_id]; if($rate_prices['blocked']) - $rate_prices['products']['product_names'][] = '"' . $order-&gt;products['p'.$row-&gt;product_id]-&gt;product_name . '"'; + $rate_prices['products']['product_names'][] = '"' . $order-&gt;products['p'.$row-&gt;cart_product_id]-&gt;product_name . '"'; $rate_prices['products'][$row-&gt;product_parent_id] = 0; } elseif(!isset($rate-&gt;shipping_params-&gt;shipping_virtual_included) &#124;&#124; $rate-&gt;shipping_params-&gt;shipping_virtual_included &#124;&#124; $row-&gt;product_weight &gt; 0) { $price += $rate_prices['price'] * $row-&gt;cart_product_quantity;

---

It seems to fix it for me, but I'm not familiar enough with the hikashop code to be sure it's ok.

2. (Unclear error message on checkout of the form "No shipping method found for the warehouse : 2" in some circumstances)

Looking at the code, it seems this isn't a bug, just an unclear message obtained when products from more than 1 warehouse have been ordered, and some products have had their shipping blocked.

I'm now just getting rid of the message with a language override:
NO_SHIPPING_METHOD_FOUND_FOR_WAREHOUSE=""

So I think my issues have been cleared up.
Thanks,
David

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODk4Mzc0LXN0cmFuZ2UtYmVoYXZpb3VyLXdpdGgtYmxvY2tlZC1wcmljZS1wZXItcHJvZHVjdC1zaGlwcGluZy1tZXRob2RzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.062 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
