Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Discount for Store Pickup

    You can test the quantity of a Product that is in the cart with:
    Code:
    $chk_cart_products_id = $_SESSION['cart']->in_cart_check('products_id','12');
    where 12 is the products_id for the Product ...
    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. #12
    Join Date
    Dec 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Discount for Store Pickup

    Hi thanks very much for that Ajeh.

    There is more than 1 product now that is excluded from discount.

    Instead of getting back the quantity of a product id, how could I get back the sum of each £value for an array of id's.

    Then how would I add 10% of the returned £ value back to the total...

    Sorry I programming experience is very limited!

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

    Default Re: Discount for Store Pickup

    Do these Products use Attributes?
    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. #14
    Join Date
    Dec 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Discount for Store Pickup

    Hi, thanks for the reply.

    Yes, there are 5 products and all but one have attributes.

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

    Default Re: Discount for Store Pickup

    I don't have a simple method for you to calculate the amount of some products out of the order total and this would require quite some customization to do this for a shipping module ...

    Perhaps someone else who has had to do this can jump in here ...
    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. #16
    Join Date
    Dec 2010
    Posts
    10
    Plugin Contributions
    0

    Default Re: Discount for Store Pickup

    Thanks Ajeh, hopefully someone has some suggestions.

    I've been trying to find some other way to do this for the past few days, but amending the code in the storepick.php is the only way I can think.

    Thank you for the last bit of code. I'll call up each product id individually and then do some maths on it and the discount.

    Would you know how I can set up a php file for testing the result of the bit of code you have supplied. If tried with the following code but can't get a result in my browser:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>
    <?php
    
    
    echo $chk_cart_products_id = $_SESSION['cart']->in_cart_check('products_id','12');
    
    ?>
    <body>
    </body>
    </html>
    Thank you again.

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

    Default Re: Discount for Store Pickup

    You cannot just stick code in a file and try to run Zen Cart code from it ... there isn't any of the initial setup of code before you are trying to run that ...

    You could try to run that from an existing file such as in the shipping module, you can often echo what you are testing ...
    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!

  8. #18
    Join Date
    Jan 2011
    Posts
    1
    Plugin Contributions
    0

    Default Re: Discount for Store Pickup

    Hey, is there a way to apply a discount per item for store pickup or does it have to be a percentage of the entire order? Also, can I change the text to say 'Market pickup' rather than 'Store pickup'?

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

    Default Re: Discount for Store Pickup

    You could customize the Store Pickup storepickup shipping module to take the Shipping Cost set in the Modules ... Shipping ... when you edit the shipping module and calculate the number of items in the Cart and set a discount based on count:
    Code:
      function quote($method = '') {
        global $order;
        global $cart;
        $chk_count = -($_SESSION['cart']->count_contents() - $_SESSION['cart']->free_shipping_items());
        $this->quotes = array('id' => $this->code,
                              'module' => MODULE_SHIPPING_STOREPICKUP_TEXT_TITLE,
                              'methods' => array(array('id' => $this->code,
                                                       'title' => MODULE_SHIPPING_STOREPICKUP_TEXT_WAY,
                                                       'cost' => $chk_count * MODULE_SHIPPING_STOREPICKUP_COST)));
    
        if ($this->tax_class > 0) {
    So if you set the Shipping Cost to: 1.00 ... then it will calculate all of the items in the cart and reduce it by the Free Shipping items, such as Gift Certificates and Downloads, and multiply that by the Shipping Cost ...

    This has already set the amount to a negative amount so enter: 1.00 for a discount and, if for some bizzaro reason you want to charge for the Pickup per item then enter: -1.00 ...

    You can make that amount anything you want ... I just used $1.00 per Product per Quantity for this this example ...
    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!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Store pickup; category/product level discount
    By WetSteve in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 4 Sep 2015, 06:40 PM
  2. Is it possible to apply discount to store pickup customers?
    By malcshan in forum General Questions
    Replies: 4
    Last Post: 23 Apr 2011, 02:17 PM
  3. Discount for Pickup in Store...?
    By bbjay in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 23 Apr 2009, 09:15 PM
  4. Store Pickup for Friends only
    By Darkwander in forum Addon Shipping Modules
    Replies: 10
    Last Post: 1 Nov 2006, 01:33 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