Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Mileage based Shipping for One Category

    Hi Indeed it does, but it also lists the per weight shipping as well (remember I changed the wording to Total shipping from per weight unit?)

    Click image for larger version. 

Name:	ss1.jpg 
Views:	48 
Size:	50.4 KB 
ID:	17491

    Click image for larger version. 

Name:	ss2.jpg 
Views:	34 
Size:	37.1 KB 
ID:	17492
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: Mileage based Shipping for One Category

    Also the multi category does not work. I attach a screenshot of the bench moduke for category 60

    Click image for larger version. 

Name:	SS3.jpg 
Views:	30 
Size:	35.4 KB 
ID:	17493

    Please help.
    Debbie Harrison
    DVH Design | Web Design blog

  3. #13
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: Mileage based Shipping for One Category

    As mc12345678 pointed out in post #8 , the Per Weight Unit shipping module needs to be modified as well.

    So, if the cart contains an item from category 78 plus other products from other categories, then the Per Weight Unit shipping module must be disabled.

    In that module you insert (corresponding to my post #2):

    PHP Code:
    // bof disable only for certain category in cart
        
    if (IS_ADMIN_FLAG == false) {
          if ((
    $_SESSION['cart']->in_cart_check('master_categories_id','78') > 0))
              {
              
    $this->enabled false;
          } else {
              
    $this->enabled true;
              }
            }
    // eof disable only for certain category in cart 

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

    Default Re: Mileage based Shipping for One Category

    hi

    Ok its very unlikely that a client will order both an assembled unit and a flat packed unit on one order. If that helps matters.
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: Mileage based Shipping for One Category

    Ok I have read that thread and added the following to perweightunit.php

    Code:
    // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
              $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
          }
    
          // disable for one master_categories_id
          if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','78') > 0)) {
              $this->enabled = false;
          }
    And the per weight unit works fine with 2nd shipping method appearing. But if I clear this cart and try to buy an item from the other categories, nothing appears.

    In fact the javascript pop-up box for shipping estimator does not pop up.

    Please help.
    Debbie Harrison
    DVH Design | Web Design blog

  6. #16
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: Mileage based Shipping for One Category

    Quote Originally Posted by dharrison View Post
    Ok I have read that thread and added the following to perweightunit.php

    Code:
    // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
              $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
          }
    
          // disable for one master_categories_id
          if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','78') > 0)) {
              $this->enabled = false;
          }
    And the per weight unit works fine with 2nd shipping method appearing. But if I clear this cart and try to buy an item from the other categories, nothing appears.

    In fact the javascript pop-up box for shipping estimator does not pop up.

    Please help.
    Try and replace your code:

    PHP Code:
    // disable for one master_categories_id
      
    if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','78') > 0)) {
          
    $this->enabled false;
      } 
    with this one:

    PHP Code:
    // bof disable only for certain category in cart
        
    if (IS_ADMIN_FLAG == false) {
          if ((
    $_SESSION['cart']->in_cart_check('master_categories_id','78') > 0))
              {
              
    $this->enabled false;
          } else {
              
    $this->enabled true;
              }
        }
    // eof disable only for certain category in cart 

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

    Default Re: Mileage based Shipping for One Category

    It works!!!! Thank you so much

    One last thing: How could I opt for 2 master categories?
    Debbie Harrison
    DVH Design | Web Design blog

  8. #18
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Mileage based Shipping for One Category

    Quote Originally Posted by dharrison View Post
    It works!!!! Thank you so much One last thing: How could I opt for 2 master categories?
    Go back to frank18's post #4 and follow the format of the "if" part of the code. Don't change the content of your new code that sets $this->enabled to true/false. Just duplicate the if(){ part.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Mileage based Shipping for One Category

    Hi mc

    I have tried this line in both the mileageship.php and perweightunit.php files and once again I get the per weight unit showing up a £0

    Try and purchase https://sitstandforbusiness.com/ssfb...dule-p-29.html and you'll see what I mean.
    Debbie Harrison
    DVH Design | Web Design blog

  10. #20
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Mileage based Shipping for One Category

    Quote Originally Posted by dharrison View Post
    Hi mc

    I have tried this line in both the mileageship.php and perweightunit.php files and once again I get the per weight unit showing up a £0

    Try and purchase https://sitstandforbusiness.com/ssfb...dule-p-29.html and you'll see what I mean.
    In one file should have:
    Code:
    // bof enable only for certain category in cart
        if (IS_ADMIN_FLAG == false) {
          if (($_SESSION['cart']->in_cart_check('master_categories_id','78') > 0) ||
             ($_SESSION['cart']->in_cart_check('master_categories_id','99') > 0))
              {
              $this->enabled = true;
          } else {
              $this->enabled = false;
              }
            }
    // eof enable only for certain category in cart
    In the other it should be almost exactly the same but "reversed":
    Code:
    // bof enable only for certain category in cart
        if (IS_ADMIN_FLAG == false) {
          if (($_SESSION['cart']->in_cart_check('master_categories_id','78') > 0) ||
             ($_SESSION['cart']->in_cart_check('master_categories_id','99') > 0))
              {
              $this->enabled = true;
          } else {
              $this->enabled = false;
              }
            }
    // eof enable only for certain category in cart
    That is for product that have a master category of 78 and 99. While I haven't navigated the site enough to see if there is even a 78 in the category uri for any of them I have so far found 57 and 60 as a result of the limited testing performed and the below information.

    I'm not sure which shipping method this product is to represent. If it is "weight" based it's a no go, because it weighs nothing. If it is to be the other method, well, it appears as if no shipping price is applied so there is a shipping method that is presented, but it doesn't have a cost.

    As far as entering a shipping destination I haven't a clue what locations may/may not work for this store so I am not surprised at any lack of specific shipping calculations. Also, take not of a few things with the site: there is mixed content (annoying to try to test something that pops up a warning message on each screen), hovering over the cart causes the screen on at least my mobile device to move and actually prevent getting to the cart, when I added one of the mileage based products (as identified in the category name) and viewed the shipping estimator the first line after the close button indicated some sort of error being caught (that doesn't occur with the above product).

    As for the "line" of code when I went to this product: https://sitstandforbusiness.com/ssfb...form-p-62.html and added it to the cart, I did get a "weight" based Total shipping cost in £. So it tells me that there is something about the logic that is working, whether the product is setup correctly or not...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v154 Mileage based shipping module?
    By Fjolsvith in forum Addon Shipping Modules
    Replies: 32
    Last Post: 1 Dec 2018, 06:42 AM
  2. Module for local mileage based delivery?
    By esobalvarro in forum General Questions
    Replies: 0
    Last Post: 8 Feb 2010, 04:39 AM
  3. set different shipping rates based on zones only for one country.. need help..
    By daxchoki in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 13 Dec 2009, 06:19 PM
  4. Urgent - One type of shipping for only one category
    By beyre in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 16 Oct 2009, 05:01 PM
  5. Free Shipping based on quantity - for one product only
    By Schanz in forum Addon Shipping Modules
    Replies: 4
    Last Post: 11 Mar 2009, 12:16 AM

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