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! :)
Views: 10,146
Zen Follower
No, I didn't. Thanks for pointing me in the right direction! You rock! :)
Administrator
Thanks, but it was RixStix who took the time to enumerate the various corrections needed to the template files.
Totally Zenned
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?
Administrator
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.
Administrator
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.
Totally Zenned
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.
Zen Follower
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:
The download option is selected by default. But every now and then, customers check out without selecting either option. How can this be?
Administrator
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.
Zen Follower
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!
Administrator
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.
Administrator
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 ...
Administrator
v1.1.0 has been submitted to the plugins and will be available here (http://www.zen-cart.com/downloads.php?do=file&id=1933) once approved.
You can also download the plugin from its github repository: https://github.com/lat9/restrict_digital_downloads/releases/tag/v1.1.0
Zen Follower
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.
Administrator
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?
Zen Follower
No, the IP address looks normal. One of them is 72.235.150.237 (this isn't IPv6, is it?).
Zen Follower
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!
Administrator
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.
Totally Zenned
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
Totally Zenned
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?
Administrator
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.
Tell staff why this post should be reviewed.