Page 4 of 12 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 113
  1. #31
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Restrict Digital Downloads [Support Thread]

    http://chainweavers (dot) info/ZEN153/index.php?main_page=product_info&cPath=155&products_id=875
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  2. #32
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,945
    Plugin Contributions
    96

    Default Re: Restrict Digital Downloads [Support Thread]

    OK, so there's still something funny going on with the checkbox-type options. What happens if you "convert" that option to a radio-button (especially since the checkbox-type option values are independent)?

  3. #33
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Restrict Digital Downloads [Support Thread]

    Quote Originally Posted by lat9 View Post
    What happens if you "convert" that option to a radio-button (especially since the checkbox-type option values are independent)?
    Functions as expected.
    pdf attribute cannot be added to cart.
    email me attribute can be added to cart.

    I don't think it is worth your time to worry with the checkbox optiontype. We only used checkbox because one product contains more than one download file and it was easiest (at the time) to use checkbox attributes than to futz with something different.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  4. #34
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,945
    Plugin Contributions
    96

    Default Re: Restrict Digital Downloads [Support Thread]

    I'll still play with the checkbox processing (it bugs me that it's not working), but I'll lower its pr

  5. #35
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Restrict Digital Downloads [Support Thread]

    TNX for everything Cindy

    Our accountant indicated that the logic of this plugin is sufficient for our business.

    When I was asked for statutory examples of how the EU expects to enforce within the USA, I could provide none; so I was also told the advice may change if/when anyone finds those specifics.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  6. #36
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,945
    Plugin Contributions
    96

    Default Re: Restrict Digital Downloads [Support Thread]

    Happy to help, Rick.

  7. #37
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Restrict Digital Downloads [Support Thread]

    HELP. I must have done something stupid when uploading to the live site but have not been able to find it after a couple hours.

    I just uploaded the files to my live site.
    Edited/merged the tpl_footer
    updated the IP2location csv

    In my sandbox, I had edited
    /YOUR_ADMIN/includes/extra_datafiles/ip2country_file_database_admin_names.php

    by inserting US into the string for testing.

    I did not do this on my live site but checked that file to make sure that US was not included in the string.

    My home IP receives the yellow warning.
    If I select the alternate delivery method attribute, I can add the item to the cart.

    the only log file generated is
    Code:
    [27-Dec-2014 13:48:51 America/Los_Angeles] #1  sprintf() called at [/home/XXXXXXXX/public_html/niahc/tools_update_ip2country.php:57]
    which you said to ignore

    I'm still looking for my OOPS but if you have any ideas, I'm all ears.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  8. #38
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Restrict Digital Downloads [Support Thread]

    Just downloaded 1.0.1 and used that fileset instead of the original files.

    same result.

    Also, digital downloads which are no charge/free receive the yellow alert.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  9. #39
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,945
    Plugin Contributions
    96

    Default Re: Restrict Digital Downloads [Support Thread]

    Arggh, yet-another update to /includes/init_includes/init_restrict_digital_downloads.php. The $customers_ip_address variable was not set until after the auto-load processing. If you've got an active session (since the restriction is set into a session variable), you'll need to delete the zenid cookie set for your site to verify.
    Code:
    <?php
    // -----
    // Part of the "Digital Download Restrictions" plugin by lat9
    // Copyright (c) 2014 Vinos de Frutas Tropicales
    //
    
    function is_digital_download ($products_id, $options_id, $options_value_id) {
      global $db;
      
      $sql = "SELECT pa.products_id FROM " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
              WHERE pa.products_id = " . (int)$products_id . "
                AND   pa.options_id = " . (int)$options_id . "
                AND   pa.options_values_id = " . (int)$options_value_id . "
                AND   pa.products_attributes_id = pad.products_attributes_id LIMIT 1";
      $sql_result = $db->Execute($sql);
    
      return ($sql_result->EOF) ? false : true;
      
    }
    
    $ipv4_address_check = filter_var ($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
    if (!$ipv4_address_check) {
      $is_restricted_ip = true;
      
    } else {
      $ipv4_quads = explode ('.', $_SERVER['REMOTE_ADDR']);
      $ipv4_integer = $ipv4_quads[3] + $ipv4_quads[2] * 256 + $ipv4_quads[1] * 256 * 256 + $ipv4_quads[0] * 256 * 256 * 256;
      
      $ipv4_check = $db->Execute ("SELECT * FROM " . TABLE_IP2COUNTRY . " WHERE ip_from <= $ipv4_integer AND ip_to >= $ipv4_integer LIMIT 1");
      $is_restricted_ip = !($ipv4_check->EOF);
    }
    if ($is_restricted_ip) {
      $_SESSION['is_restricted_ip'] = $is_restricted_ip;
    }
    For your free downloads, are they set with the "Product is free" flag?

  10. #40
    Join Date
    Mar 2008
    Location
    Brampton, Cumbria, United Kingdom, United Kingdom
    Posts
    816
    Plugin Contributions
    2

    Default Re: Restrict Digital Downloads [Support Thread]

    This plugin will be very useful when the new EEC rules for VAT come in to play 1st January 2015. http://www.grant-thornton.co.uk/Glob...es-in-2015.pdf Not my site, worth a read. Do not fall in to the trap
    Learning Fast.
    Eden Craft Supplies

 

 
Page 4 of 12 FirstFirst ... 23456 ... LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. v151 Limit Quantities for Downloads and Virtual Products [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 47
    Last Post: 17 Jan 2016, 03:48 PM
  3. v154 Email Downloads Support Thread
    By swguy in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 17 Jun 2015, 06:41 PM
  4. Digital Downloads
    By keithck73 in forum General Questions
    Replies: 8
    Last Post: 9 Mar 2009, 06:45 PM
  5. Admin Users - Restrict Product Categories Support Thread
    By anafor in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Aug 2008, 09:30 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