Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default 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.
    Debbie Harrison
    DVH Design | Web Design blog

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Some products being made available in Europe on UK website

    Quote Originally Posted by DrByte View Post
    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.
    Debbie Harrison
    DVH Design | Web Design blog

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Some products being made available in Europe on UK website

    Quote Originally Posted by DrByte View Post
    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
    Debbie Harrison
    DVH Design | Web Design blog

  6. #6
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default 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.
    Debbie Harrison
    DVH Design | Web Design blog

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default 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
    Debbie Harrison
    DVH Design | Web Design blog

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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 &nbsp; </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 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 FMF: Is there a reason that the configuration setting is not made available?
    By lat9 in forum PayPal Express Checkout support
    Replies: 9
    Last Post: 25 Jun 2021, 08:20 AM
  2. Showing available & expired date for Featured Products on website
    By liizz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 21 Feb 2011, 08:00 PM
  3. HELP -- need payment module for Europe -- Europe based merchant (not US/UK)
    By jazznuts699 in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 24 Dec 2009, 11:55 PM
  4. Some items available for international shipping & some not? Anyone know how?
    By Treasuresbycaz in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 11 Jan 2009, 11:08 PM
  5. Make products available for some customers, not others.
    By Peekay in forum General Questions
    Replies: 2
    Last Post: 29 Mar 2007, 11:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR