Results 1 to 10 of 10
  1. #1

    Delivery options?

    Hi all,
    Thanks to Merlin I have added the Fedex mod to my existing Royal Mail and they are working great. I have set it up so that Royal Mail does the UK and Fedex does the EU.
    My problem is that when I add to cart a product going to the UK Fedex doesn’t show on the page, which is the way I want it, but if I add to cart to the EU the Royal Mail option shows as an option at £0.00 and it can still be selected by a customer. I would rather it didn’t show up on an EU address.
    I am grateful for any help
    Thanks as all ways

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

    Default Re: Delivery options?

    You can build a function to manage the Shipping Modules based on additional criteria to more or less turn them off/on as needed ...

    Currently ... you will see that the modules have a $this->enabled ... if that is false then the module does not run ...

    Peek in flat.php ... you will see a function is used to control this for Free Shipping ...
    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            
    $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true false);
          } 
    There is a catalog function zen_get_shipping_enabled and an admin function zen_get_shipping_enabled ...

    The Admin function returns true ... as we are not "controlling" the module in the Admin ... so we just want it to run ...

    You can make your own function based on anything you want to customize the shipping modules ...

    PHP Code:
          // disable only when entire cart is free shipping
      
    if (zen_get_my_shipping_test($this->code) {
          if (
    zen_get_shipping_enabled($this->code)) {
            
    $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true false);
          }
      } 
    The function zen_get_my_shipping_test you then write to return either true or false based on whatever critera based on the shipping module code that is passed to it ... setting the last result to true if nothing as returned false ...
    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!

  3. #3

    Re: Delivery options?

    It seems to be a habit of mine to look stupid but I’m still lost.
    I found the flat.php, found the entry I took a look in the Royal Mail php while I was there but I have no idea what I’m doing with it.
    Sorry

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

    Default Re: Delivery options?

    You should see references to the $this->enabled

    It may or may not include the code that controlls when it should show in regard to Free Shipping ...

    All Shipping Modules should include this ... but not all developers of the modules look ahead to the changes in the core Zen Cart modules to see changes ...

    Example:
    Free Shipping has automatic adjustment on weight as weight is there or it is not ...

    However, those that are based on item or price should us an additional adjustment that allows for Free Shipping for number of items and total price or the shipping is off ...

    If you were to add the existing code ... be careful of how it reads, as you want just the IF statement added, not to change the actual line inside the IF ...

    Compare flat.php to item.php to usps.php to see the differences ...

    I have not looked at the Royal module so I don't have specifics for you ...
    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!

  5. #5

    Default Re: Delivery options?

    Yeah it does have a line for $this->enabled
    $this->enabled = ((MODULE_SHIPPING_ROYALMAIL_STATUS == 'True') ? true : false);
    I can’t see a mention of free delivery but I do have free delivery over £50 to the UK and Royal Mail doesn’t show up on that it also has a couple of lines about zones…

    //12 FEB 04 MBeedell NO specified country (or *) then use this zone for all shipping rates
    if ($dest_zone == 0) {
    for ($i=1; $i<=$this->num_zones; $i++) {
    $countries_table = constant('MODULE_SHIPPING_ROYALMAIL_ZONES_COUNTRIES_' . $i);
    if ($countries_table == '' or $countries_table == '*') {
    $dest_zone = $i;
    break;
    }
    }
    }
    if ($dest_zone == 0) {
    $error = true;
    } else {
    $shipping = -1;

    But it all means nothing to me, sorry

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

    Default Re: Delivery options?

    The override on the Free Shipping that you are using is controlled via the Order Total Module ... Shipping ...

    There are other methods to have Free Shipping such as:

    0 weight when 0 weight means Free Shipping

    Product is marked Always Free Shipping

    Product is Virtual

    For this, there is the function added to the shipping module to control:
    PHP Code:
    $this->enabled = ((MODULE_SHIPPING_ROYALMAIL_STATUS == 'True') ? true false); 
    So to get technical, in your case that line should read:

    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
           
    $this->enabled = ((MODULE_SHIPPING_ROYALMAIL_STATUS == 'True') ? true false);
          } 
    This would turn off the Royal Mail when a Product is marked as Always Free Shipping or a zillion other reasons ... and you would have installed the Shipping Modules Free Shipping freeshipper

    That would only show when the shipping is Free and the other shipping modules should be turned off ...

    Next, you have an additional condition or criteria for when to offer Royal Mail ...

    This is where you can make your own function to work in a similar manner ...
    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!

  7. #7

    Default Re: Delivery options?

    Now I’m really feeling stupid coz I’ve been going through it and trying changes and killed it a couple of times but I haven’t been able to make it work the way I need it

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

    Default Re: Delivery options?

    Without taking the time to download the Royal Mail and figuring all this out for you ... it is really hard to break this down further ...
    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!

  9. #9

    Default Re: Delivery options?

    Thanks a lot for your help
    I'll keep going through it till I beat it into submission

  10. #10

    Default Re: Delivery options?

    Thanks again for all the help and just to let you know I think I’ve fixed it.
    I was looking over this bit again (it starts on line 67)

    12 FEB 04 MBeedell NO specified country (or *) then use this zone for all shipping rates
    if ($dest_zone == 0) {
    for ($i=1; $i<=$this->num_zones; $i++) {
    $countries_table = constant('MODULE_SHIPPING_ROYALMAIL_ZONES_COUNTRIES_' . $i);
    if ($countries_table == '' or $countries_table == '*') {
    $dest_zone = $i;
    break;
    }
    }
    }

    It seemed to say that if the zone wasn’t accepted to return a 0 so I commented out the lot and it sorted it. Now it just comes up with “No shipping available to the selected country”
    Thanks again for all your help

 

 

Similar Threads

  1. Delivery options and Paypal
    By MikeGall2 in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 15 Jan 2014, 09:14 AM
  2. Delivery Options
    By dmagic in forum General Questions
    Replies: 1
    Last Post: 21 Dec 2010, 09:02 AM
  3. Dynamic Shipping/Delivery Options
    By OrganicMan in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 9 Feb 2010, 11:55 PM
  4. USPS International Delivery Options
    By JRayfield in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 7 Jan 2009, 08:41 PM
  5. Multiple Delivery Options
    By claschy in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 19 May 2008, 12:56 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