Some products being made available in Europe on UK website
Hi
Our office furniture website is currently set up for clients in the UK. As they are cheaper the more units you buy, I have had to implement the Product Price Manager to set up the Unit Cost.
We would like to make some of our desk frames available to Europe as well, but these will only be available per unit instead of the bulk offer that we have with the UK. I have been racking my brains for a few days now and think the only practical way of doing this is to set up a new category for European goods.
My question is, can I set up the shipping/ available countries a particular category? Is this a practical setup or can anyone think of a better way.
Any help as always will be gratefully received.
Thanks in advance.
Re: Some products being made available in Europe on UK website
Are you saying that you want to disable Quantity Discounts based on the geographic zone to which the customer is shipping?
Re: Some products being made available in Europe on UK website
Quote:
Originally Posted by
DrByte
Are you saying that you want to disable Quantity Discounts based on the geographic zone to which the customer is shipping?
Quantity discounts for our products are set up for the UK but we are looking to deliver single frame units to Europe. If disabling is the option then yes, but I am wondering if it would just be easier to create a separate category called desk frames and make that available to Europe.
But I don't even know if it is possible to set up a category with different shipping and coverage or have a certain option on the existing product, and this is what I am seeking advice on.
Re: Some products being made available in Europe on UK website
Some possible options (there may be others):
a) Create new categories and new products without qty discounts set on them. This may be confusing to customers, especially if they're duplicates of other products that do have discounts.
b) Write custom code to not display (or calculate) the qty discounts on any products if the customer is logged in and has selected a shipping zone outside the UK (since that's what you said is your primary area where discounts do apply).
This will be less confusing to customers, especially if you also add text to the template saying that discounts are only relevant in the UK.
The custom code would need to not only prevent display from within your template, but also prevent the calculation within the shopping cart and order classes.
Caveat: You might have to do even more custom coding if you wanted all this logic to only activate on "certain products" instead of universally across your store.
Re: Some products being made available in Europe on UK website
Quote:
Originally Posted by
DrByte
Some possible options (there may be others):
b) Write custom code to not display (or calculate) the qty discounts on any products if the customer is logged in and has selected a shipping zone outside the UK (since that's what you said is your primary area where discounts do apply).
This will be less confusing to customers, especially if you also add text to the template saying that discounts are only relevant in the UK.
The custom code would need to not only prevent display from within your template, but also prevent the calculation within the shopping cart and order classes.
Caveat: You might have to do even more custom coding if you wanted all this logic to only activate on "certain products" instead of universally across your store.
I'm all for option 2 or 3. The only thing is it will be only for selected products (desk frames rather than complete desks). I can do basic coding and follow patterns of code, so please could I ask what custom code I should add (and where).
Many thanks :cool:
Re: Some products being made available in Europe on UK website
Actually, Option 3 is much more preferable. Please DrByte (or anyone else that knows) I would very much appreciate it if you could inform me of the code I would need to add to the website and where.
Thanking you in advance.
Re: Some products being made available in Europe on UK website
Grandma's billing address is in the UK and she is shipping to herself in the UK ... does this mean she DOES get the discount quantities?
Grandma's billing address is in the UK but she is shipping to little Tiny Tim in France ... does this mean she DOES NOT get the discount quantities?
Little Tiny Tim's billing address is in France and he is shipping to himself in France ... does this mean he DOES NOT get the discount quantities?
Little Tiny Tim's billing address is in France but he is shipping to Grandma in the UK ... does this mean he DOES get the discount quantities?
If Tiny Tim's customer address, billing address and shipping address is in France can he order quantity 6 of a chair (or what ever you are selling) but not get the quantity discount?
If Tiny Tim then changes the shipping address to Grandma's in the UK should he now get the quantity discount?
Re: Some products being made available in Europe on UK website
Hi Ajeh
Yes basically, with the shipping caculated as well. Although its very unlikely that European users are going to order our items in bulk. I should point out its both a B2B and a B2C company
Re: Some products being made available in Europe on UK website
I hunted through the code and possible changes for this and found a way to make this happen if the idea is only those with a shipping address with the country_id of 222 is what you want to be able to have the discount quantities ...
1 Guests would NOT see the discount quantities when added to the cart (this could be done so that they can, but I have not looked to see if that complicates things)
2 Discount quantities would initially show if the customer's default address is countries_id 222
3 When the shipping address is changed either to countries_id 222 or another country on the checkout_shipping a message will show on the checkout_payment page saying discounts available/not available
There are quite a few steps to this, so I hope not to mess up the first time listing them ...
Edit the file:
/includes/modules/pages/login/header_php.php
and add the code in RED around line 85:
Code:
$_SESSION['customer_country_id'] = $check_country->fields['entry_country_id'];
$_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id'];
// bof: set shipping country for discount quantity
$_SESSION['ship_to_customer_country_id'] = $check_country->fields['entry_country_id'];
// eof: set shipping country for discount quantity
$sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "
Edit the file:
/includes/functions/functions_prices.php
and edit the code for the function zen_get_products_discount_price_qty and add the code in RED:
Code:
$display_specials_price = zen_get_products_special_price($product_id, true);
switch ($products_query->fields['products_discount_type']) {
// bof: set shipping country for discount quantity
case ($_SESSION['ship_to_customer_country_id'] != 222):
//no discount applies
$discounted_price = zen_get_products_actual_price($product_id);
break;
// eof: set shipping country for discount quantity
// none
case ($products_discounts_query->EOF):
Edit the file:
/includes/modules/pages/checkout_shipping/header_php.php
and add the code in RED:
Code:
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
// bof: set shipping country for discount quantity
$_SESSION['ship_to_customer_country_id'] = $order->delivery['country_id'];
if ($_SESSION['ship_to_customer_country_id'] !=222) {
// not company for discount
$messageStack->add_session('checkout_payment', 'DISCOUNTS NOT VALID FOR SHIPPING DESTINATION', 'caution');
} else {
$messageStack->add_session('checkout_payment', 'DISCOUNTS ARE VALID FOR SHIPPING DESTINATION', 'success');
}
// eof: set shipping country for discount quantity
// register a random ID in the session to check throughout the checkout procedure
I would then, using your templates and overrides, edit the code for:
/includes/templates/template_default/templates/tpl_modulesproducts_quantity_discounts.php
Code:
<?php
if ($disc_cnt < $columnCount) {
// bof: set shipping country for discount quantity
?>
<td align="center" colspan="<?php echo ($columnCount+1 - $disc_cnt)+1; ?>"><span class="alert">DISCOUNTS FOR UK SHIPPING ONLY </span></td>
<?php } // eof: set shipping country for discount quantity ?>
</tr>
<?php
if (zen_has_product_attributes($products_id_current)) {
?>
<tr>
In theory, this will allow Discount Quantities for ALL Products only for the UK country_id 222 ... and as the shipping address is changed in the checkout_shipping, or if the customer logs in to an account with the Primary address as the UK, it will switch it on/off ...
Re: Some products being made available in Europe on UK website
NOTE: To not see any message about Discount Quantities on the checkout_payment when no Products are in the cart that use Discount Quantities, you can change the code a little for the file:
/includes/modules/pages/checkout_shipping/header_php.php
Code:
// bof: set shipping country for discount quantity
$_SESSION['ship_to_customer_country_id'] = $order->delivery['country_id'];
if ($_SESSION['cart']->in_cart_check('products_discount_type') > 0) {
if ($_SESSION['ship_to_customer_country_id'] !=222) {
// not company for discount
$messageStack->add_session('checkout_payment', 'DISCOUNTS NOT VALID FOR SHIPPING DESTINATION', 'caution');
} else {
$messageStack->add_session('checkout_payment', 'DISCOUNTS ARE VALID FOR SHIPPING DESTINATION', 'success');
}
}
// eof: set shipping country for discount quantity
and now the message will only show if a Product with possible Discount Quantities are in the order during checkout ...