Results 1 to 10 of 18

Hybrid View

  1. #1
    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

    On the Discount Coupon add the Gift Card to the restrictions so that it is set to DENY ...
    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!]
    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!

  2. #2
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

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

    Quote Originally Posted by Ajeh View Post
    On the Discount Coupon add the Gift Card to the restrictions so that it is set to DENY ...
    But I would have to add this to EVERY discount coupon that I have? Is there a way to make a global restriction?

  3. #3
    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 would need to add a record to for each Discount Coupon into the table:
    coupon_restrict

    for the restriction ...
    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!]
    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!

  4. #4
    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?

  5. #5
    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!]
    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!

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

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


  7. #7
    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!]
    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!

 

 

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

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