Zen Cart Logo
Forums / All Other Contributions/Addons / Restrict Digital Downloads [Support Thread]

Restrict Digital Downloads [Support Thread]

Views: 10,146

Results 81 to 100 of 113
7 Feb 2015, 4:05 PM
#81
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Restrict Digital Downloads [Support Thread]

No, I didn't. Thanks for pointing me in the right direction! You rock! :)

7 Feb 2015, 4:12 PM
#82
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

Thanks, but it was RixStix who took the time to enumerate the various corrections needed to the template files.

11 Feb 2015, 2:55 PM
#83
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

Just realized that since there are now 2 options for the digital download, when the "EU Alternate Delivery Method" option is selected, it causes shipping charges to be added to the product at checkout.

Tried changing the product to virtual but when that is done, then there is zero shipping charges for the entire order when the order contains other, physical products.

Suggestions?

11 Feb 2015, 7:16 PM
#84
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

RixStix:

Just realized that since there are now 2 options for the digital download, when the "EU Alternate Delivery Method" option is selected, it causes shipping charges to be added to the product at checkout.

Tried changing the product to virtual but when that is done, then there is zero shipping charges for the entire order when the order contains other, physical products.

Suggestions?
RixStix, these settings and their outcomes are outside the range of RDD; I suggest that you open a new thread (perhaps in the setting up products' attributes forum?) as the attributes-related handling is handled by the base Zen Cart functionality.

11 Feb 2015, 7:56 PM
#85
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

FWIW, I just ran a test (using Zen Cart v1.5.4) where a product has a "download" attribute and a "email it to me" option. I modified the product's definition such that the Product is Virtual (No Shipping).

Checking out with that product and another, physical, product resulted in the checkout_shipping page being displayed; removing the physical product bypassed the checkout_shipping page.

Like I said in my previous post, you should take any further discussion of those specifics to a separate thread.

11 Feb 2015, 8:57 PM
#86
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

TNX Cindy,

I will do that. I just wanted to start here first, though I did get my description of the issue a bit bassackwards.

5 Apr 2015, 1:33 PM
#87
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

I'm back (sorry!). I've found that sometimes, somehow, people are checking out without selecting either option to purchase an e-book on my site. I have two options set up:

  1. Download ZIP file (for customers not in EU countries)
  2. E-Mail (for EU customers)

The download option is selected by default. But every now and then, customers check out without selecting either option. How can this be?

5 Apr 2015, 2:09 PM
#88
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

It happens because the default selection (download) is disabled and the email option is not selected by the customer ... I've experienced the same issue and will let you know when I've got a solution.

5 Apr 2015, 2:19 PM
#89
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

No, I also get the same thing with US customers. I don't know how they manage to do it, but they somehow disable both radio buttons. It's frustrating!

5 Apr 2015, 4:34 PM
#90
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

jmsnyder23:

No, I also get the same thing with US customers. I don't know how they manage to do it, but they somehow disable both radio buttons. It's frustrating!
PM me a link to your site with one of the downloads that isn't working and I'll see what's up.

6 Apr 2015, 11:19 AM
#91
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

Since there's no look-up for IPv6 addresses, they're also restricted. That would explain why some of your US customers are also restricted.

In either case, the following change (applied to each of the /includes/templates/YOUR_TEMPLATE/{product type}/extra_main_template_vars/restrict_digital_downloads.php files) to the jQuery script will ensure that one of the radio buttons in the downloadable product's group is selected during the restriction:

<script type="text/javascript">
$(document).on ('ready', function(){
  $('<?php echo $download_selectors; ?>').each(function(){
    $(this).removeAttr( 'selected checked' );
    $(this).attr( 'disabled', 'disabled' );
    if ($(this).is( 'input' )) {
      var radioName = $(this).prop( 'name' );
      $(this).siblings('input[name="'+radioName+'"]').eq(0).prop( 'checked', true );

    }
  });
});
</script>

I'll be submitting this change to the plugins for review ...

6 Apr 2015, 4:13 PM
#93
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

Thanks. I don't know if this is what's happening or not. It doesn't work for the same customer all the time, or for the same product.

For instance, I had a customer in the US buy 3 ebooks yesterday. Two of them he managed to purchase without choosing either option (download -- the default -- or email). The last ebook he chose the download option. One of the books that didn't get an option is a free ebook, so there is only 1 option (download only). Yet he still managed not to select it.

Thus his order shows three books, 2 with no attributes and 1 with a download link.

I found something in the forums about the possibility of two downloadable products with the same attribute in a cart canceling each other out, but I don't know if that's what's happening here or not. When I tried to implement the code they suggested, my product page didn't load at all. That info was here: http://www.zen-cart.com/showthread.php?81375-Getting-the-default-attribute-radio-button-checked

It doesn't happen a lot but it DOES happen. I've asked customers how they managed to add the ebook to their carts without selecting an attribute, but they don't seem to know.

6 Apr 2015, 7:03 PM
#94
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

You can see the customer's IP address as part of the Customers->Orders display. Did any of the questionable orders come from an IPv6 address?

7 Apr 2015, 12:16 PM
#95
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

No, the IP address looks normal. One of them is 72.235.150.237 (this isn't IPv6, is it?).

7 Apr 2015, 12:38 PM
#97
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

jmsnyder23:

No, the IP address looks normal. One of them is 72.235.150.237 (this isn't IPv6, is it?).
Nope, it's an IPv4 address. With the updated version of RDD, you can enter that IP address in the IP to Country tool to make sure that it's not restricted.

jmsnyder23:

I'm going to implement the additional radio button mentioned in this thread as a workaround:

http://www.zen-cart.com/showthread.php?113388-why-can-t-I-make-a-radio-button-mandatory

Thanks for your help!
OK, but the jQuery change I posted above should also address the issue.

11 Apr 2015, 9:05 PM
#98
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

Any idea why I get the following message when I try to upload the unzipped CSV file?

Please choose a CSV file to be uploaded.

The file I am selecting to upload with the browse button is: IP2LOCATION-LITE-DB1

11 Apr 2015, 9:22 PM
#99
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Restrict Digital Downloads [Support Thread]

Correction - The file I am trying to upload is IP2LOCATION-LITE-DB1.CSV

It always gives me that "Please choose a CSV file to be uploaded." error after I hit the UPLOAD button. Cannot figure out why it doesn't see the file and update the database. Any ideas?

12 Apr 2015, 2:02 PM
#100
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Restrict Digital Downloads [Support Thread]

What are the permissions associated with the directory into which you've downloaded/unzipped the CSV file? I've seen that message on my local machine when I put the CSV file into /MYADMIN/backups, for example.