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:
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->products as $k => $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->products) && !in_array($row->product_id, $rate->products))
continue;
@@ -191,7 +196,7 @@ class hikashopShippingPlugin extends hikashopPlugin {
} elseif(isset($rate_prices['products'][$row->product_parent_id])) {
$price += $rate_prices['products'][$row->product_parent_id];
if($rate_prices['blocked'])
- $rate_prices['products']['product_names'][] = '"' . $order->products['p'.$row->product_id]->product_name . '"';
+ $rate_prices['products']['product_names'][] = '"' . $order->products['p'.$row->cart_product_id]->product_name . '"';
$rate_prices['products'][$row->product_parent_id] = 0;
} elseif(!isset($rate->shipping_params->shipping_virtual_included) || $rate->shipping_params->shipping_virtual_included || $row->product_weight > 0) {
$price += $rate_prices['price'] * $row->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