Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Location
    Charlottesville, VA
    Posts
    431
    Plugin Contributions
    0

    Default Re: Erroneous free shipping on 1 real item + 1 virtual item in cart

    Question:

    Where is products_id from the products table joined with the products_options_values table? How is a product linked with its options/values/attributes?

    In my code sample below, the $product_option statement: I know this won't work. It's my "monkey see, monkey do" style of programming [i.e., pretty ignorant.] From scouting around in the database, one way that would work [but not very robust] be to check if products_options_values_name = PDF. But I'm not seeing how a product in the products table gets connected to its options.

    The rule I'm trying to meet is "Don't show purchase order payment option if any item in the shopping cart is a downloadable non-free item." We have a free PDF download that I want to exclude from the do not show purchase order payment option rule.

    Or, I could try and add the order status setting to the purchase order module, if it works as you (Linda) describe for download items. Hmm... can you suggest an example module to try out my monkey-see monkey-do programming skillz?

    In includes\modules\payment\po.php (our PO module)

    Code:
    function selection() {
    	  global $order, $db;
    
    	  $po_enabled = true;
    	  $products = $order->products;
    
    	  foreach ($products as $product) {
    
          $product_check = $db->Execute("select product_is_free as free from " 
    . TABLE_PRODUCTS . " where products_id = '" . zen_get_prid($product['id']) . "'");
          $product_option = $db->Execute("select products_options_values_name as 
    option from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where 
    products_options_values_id = '" . zen_get_prid($product['id']) . "'");
    	if ($product_option->fields['option'] == 'PDF' && $product_check->fields['free'] != '1') {
    		$po_enabled = false;
    	}
    }
    If you have any ideas for me, I'd love to hear them. Otherwise, I think it's back to Mr. Chris of Absolute to give it a re-work.

    ---Diana
    Last edited by dbrewster; 27 Nov 2006 at 09:09 PM.

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

    Default Re: Erroneous free shipping on 1 real item + 1 virtual item in cart

    You might speak to Absolute and see if he can't pop in the logic for this to that module for managing the orders status ...

    That would be the best solution ...
    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!

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Erroneous free shipping on 1 real item + 1 virtual item in cart

    An possible base of code to spring from would be the get_content_type() element of the shopping cart class.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v154 Free shipping item triggers all else in cart to be free shipping
    By avansant in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 25 May 2016, 04:20 PM
  2. v154 Item has free shipping if ordered with a another item ??
    By w4mmp in forum Addon Shipping Modules
    Replies: 16
    Last Post: 22 Sep 2015, 03:06 PM
  3. Show Item is FREE shipping in the CART.
    By gloerick in forum General Questions
    Replies: 42
    Last Post: 14 Mar 2011, 02:25 PM
  4. Free shipping on one item in USA and with purchase of another item
    By jendera in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Dec 2009, 01:00 AM
  5. free shipping item combined with non free item
    By gsdcypher in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 23 Jan 2008, 02:48 AM

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