Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards

    Now there's the issue of Group Pricing. I don't want the group discount to be applied for the physical gift cards. Is there a way to add the restriction?

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

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards

    Have you an URL to these Physical Gift Cards that might give me an idea on how to do this?
    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. #13
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards


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

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards

    Edit the file:
    /includes/classes/shopping_cart.php

    and down near the bottom, add the code in RED:
    Code:
        return $in_cart_check_qty;
      }
    // eof: change $total_count for options_id/options_values_id combo
    
    //////////////////////////////////////////////////////////
    // This in_cart_product_total_price function will need to be removed in future releases - it will be there in the core
    /**
     * calculate products_id price in cart
     * USAGE:  $product_total_price = $this->in_cart_product_total_price(12);
     * USAGE:  $chk_product_cart_total_price = $_SESSION['cart']->in_cart_product_total_price(12);
     *
     * @param mixed $product_id
     */
      function in_cart_product_total_price($product_id) {
        $products = $this->get_products();
    //echo '<pre>'; echo print_r($products); echo '</pre>';
        for ($i=0, $n=sizeof($products); $i<$n; $i++) {
          $productsName = $products[$i]['name'];
          $ppe = $products[$i]['final_price'];
          $ppt = $ppe * $products[$i]['quantity'];
          $productsPriceEach = $ppe + $products[$i]['onetime_charges'];
          $productsPriceTotal = $ppt + $products[$i]['onetime_charges'];
          if ((int)$product_id == (int)$products[$i]['id']) {
    //        echo 'GOOD id: ' . $products[$i]['id'] . ' vs ' . ' $product_id: ' . $product_id . ' $products[$i][name]: ' . $products[$i]['name'] . ' $productsPriceEach: ' . $productsPriceEach . ' $productsPriceTotal: ' . $productsPriceTotal . '<br><br>';
            $in_cart_product_price += $productsPriceTotal;
          } else {
    //        echo 'NOT GOOD id: ' . $products[$i]['id'] . ' vs ' . ' $product_id: ' . $product_id . ' $products[$i][name]: ' . $products[$i]['name'] . ' $productsPriceEach: ' . $productsPriceEach . ' $productsPriceTotal: ' . $productsPriceTotal . '<br><br>';
          }
        } // end FOR loop
        return $in_cart_product_price;
      }
    // This in_cart_product_total_price function will need to be removed in future releases - it will be there in the core
    //////////////////////////////////////////////////////////
    
    }
    Next, edit the file and add the code in RED:
    /includes/modules/order_total/ot_group_pricing.php
    Code:
          $gift_vouchers = $_SESSION['cart']->gv_only();
    
    // bof: Custom snailmail GV no Group Discount
    // change 370 to proper products_id
          $snail_gift_vouchers += $_SESSION['cart']->in_cart_product_total_price(370);
    //echo '$snail_gift_vouchers: ' . $snail_gift_vouchers . '<br>';
          $discount = ($orderTotal['total'] - $gift_vouchers - $snail_gift_vouchers) * $group_discount->fields['group_percentage'] / 100;
    // eof: Custom snailmail GV no Group Discount
    
    //      echo "discout = $discount<br>";
          $od_amount['total'] = round($discount, 2);
          $ratio = $od_amount['total']/$order_total;
          /**
    Now see if this alters the Group Discount ... the 370 is the products_id for your Snail Mail Gift Certificate ...
    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. #15
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards

    In my /includes/classes/shopping_cart.php file, I don't have the same code that you have there:

    return $in_cart_check_qty;
    }
    // eof: change $total_count for options_id/options_values_id combo

    I am on version 1.39h. Perhaps that is why?

  6. #16
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards

    Never mind. I was looking at the wrong file.

  7. #17
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards

    Okay, changes are complete and now there is no group discount for snail mail cards. Thank you, Ajeh!

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

    Default Re: I want Normal Shipping Rules to apply when I ship Gift Cards

    You are most welcome ... remember the Zen Cart Team when you are rich and famous!
    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 2 of 2 FirstFirst 12

Similar Threads

  1. Why "No, Normal Shipping Rules" option for a "Product - Free Shipping" type?
    By ilikemike in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 31 Dec 2011, 12:34 AM
  2. Replies: 5
    Last Post: 2 Aug 2011, 07:27 AM
  3. What are the coupon category apply/deny rules?
    By GerryTheMole in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 7
    Last Post: 6 Feb 2011, 07:45 PM
  4. Which program governs coupon codes? I want to combine rules about free shipping
    By anita in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 21 Jul 2009, 05:57 PM
  5. Normal Shipping Rules (Cancels out Free Shipping Image)
    By haredo in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 May 2006, 08:39 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