- Posts: 54
- Thank you received: 0
Items Blocked
- eileensemporium
-
Topic Author
- Offline
Less
More
10 years 3 months ago #243748
by eileensemporium
Items Blocked was created by eileensemporium
I am using the price per item shipping item to block certain items that can't be shipped overseas. Is it possible to display what items can't be shipped to someone who add these to their cart, rather than "the cart contains..." message as the customers have items that can be shipped too and they wont know what product is the 'problem'?
Thanks
Thanks
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
10 years 3 months ago #243760
by Mohamed Thelji
Replied by Mohamed Thelji on topic Items Blocked
Hello,
That's not possible for the moment but that's a good idea, we'll integrate it so that in that case instead of displaying :
"There are %s items in your cart which we cannot ship to you"
It will display something like :
"The 'product name' product in your cart cannot be shipped to you"
We'll develop and test it on our end as fast as possible, and then get back to you !
Thank you for your feedback !
That's not possible for the moment but that's a good idea, we'll integrate it so that in that case instead of displaying :
"There are %s items in your cart which we cannot ship to you"
It will display something like :
"The 'product name' product in your cart cannot be shipped to you"
We'll develop and test it on our end as fast as possible, and then get back to you !
Thank you for your feedback !
The following user(s) said Thank You: lousyfool
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
10 years 3 months ago - 10 years 3 months ago #243846
by Mohamed Thelji
Replied by Mohamed Thelji on topic Items Blocked
Hello,
We just developed it and will add it through the next Hikashop version, but if you want it now, you'll have to edit the file :
- administrator\components\com_hikashop\classes\shipping.php" and change these lines
By
- administrator\components\com_hikashop\helpers\helper.php" and change these lines
By
- Edit your translation file and change that line
By
We just developed it and will add it through the next Hikashop version, but if you want it now, you'll have to edit the file :
- administrator\components\com_hikashop\classes\shipping.php" and change these lines
Code:
case 'product_excluded':
$value = 'X_PRODUCTS_ARE_NOT_SHIPPABLE_TO_YOU';
break;
default:
$value = $key;
break;
}
Code:
default:
$value = $key;
break;
}
}elseif(is_string($value)) {
$number = $value;
$value = $key;
Code:
$price = 0;
foreach($order->products as $k => $row) {
if(!empty($rate->products) && !in_array($row->product_id, $rate->products))
continue;
if(isset($rate_prices['products'][$row->product_id])) {
$price += $rate_prices['products'][$row->product_id];
$rate_prices['products'][$row->product_id] = 0;
} elseif(isset($rate_prices['products'][$row->product_parent_id])) {
$price += $rate_prices['products'][$row->product_parent_id];
$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;
}
}
if($price > 0) {
if(!isset($rate->shipping_price_base))
$rate->shipping_price_base = hikashop_toFloat($rate->shipping_price);
else
$rate->shipping_price = $rate->shipping_price_base;
$rate->shipping_price = $currencyClass->round($rate->shipping_price + $price, $currencyClass->getRounding($rate->shipping_currency_id, true));
}
if($price < 0) {
if(!isset($rate->errors['product_excluded']))
$rate->errors['product_excluded'] = 0;
$rate->errors['product_excluded']++;
}
Code:
$price = 0;
$rate_prices['products']['product_names'] = array();
foreach($order->products as $k => $row) {
if(!empty($rate->products) && !in_array($row->product_id, $rate->products))
continue;
if(isset($rate_prices['products'][$row->product_id])) {
$price += $rate_prices['products'][$row->product_id];
if($rate_prices['products'][$row->product_id] < 0)
$rate_prices['products']['product_names'][] = '"' . $row->product_name . '"';
$rate_prices['products'][$row->product_id] = 0;
} elseif(isset($rate_prices['products'][$row->product_parent_id])) {
$price += $rate_prices['products'][$row->product_parent_id];
$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;
}
}
if($price > 0) {
if(!isset($rate->shipping_price_base))
$rate->shipping_price_base = hikashop_toFloat($rate->shipping_price);
else
$rate->shipping_price = $rate->shipping_price_base;
$rate->shipping_price = $currencyClass->round($rate->shipping_price + $price, $currencyClass->getRounding($rate->shipping_currency_id, true));
}
if($price < 0) {
$rate->errors['X_PRODUCTS_ARE_NOT_SHIPPABLE_TO_YOU'] = implode($rate_prices['products']['product_names'], ', ');
}
Code:
X_PRODUCTS_ARE_NOT_SHIPPABLE_TO_YOU="There are %s items in your cart which we cannot ship to you"
Code:
X_PRODUCTS_ARE_NOT_SHIPPABLE_TO_YOU="The %s item(s) in your cart cannot be shipped to you"
Last edit: 10 years 3 months ago by Mohamed Thelji.
The following user(s) said Thank You: lousyfool
Please Log in or Create an account to join the conversation.
- eileensemporium
-
Topic Author
- Offline
Less
More
- Posts: 54
- Thank you received: 0
10 years 3 months ago #243881
by eileensemporium
Replied by eileensemporium on topic Items Blocked
Thanks for that, that's great news. When you propose that the build will be released?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
10 years 3 months ago #243894
by Mohamed Thelji
Replied by Mohamed Thelji on topic Items Blocked
Hello,
That modification will be added on the next Hikashop release but we don't have an established date for the moment.
That modification will be added on the next Hikashop release but we don't have an established date for the moment.
The following user(s) said Thank You: lousyfool
Please Log in or Create an account to join the conversation.
Time to create page: 0.227 seconds