Hi,
I need to add a shopping cart for files, a file cart.
After files have been added and submited a package should be created temporary and forced to download.
I’ve wrote the Script for the cart with JavaScript and PHP from the values of [file_list] with the following script:
function generateCart(data){
if( typeof data == “string” ){
data = JSON.parse(data);
}
if( data.noItm != “undefined” && data.noItm != undefined){
var mk = “<p>” + data.noItm + “</p>”;
return mk;
}
var items = [“
\n”];
for(i=0;i<data.length;i++){
obj = data[i];
var str = [
“\t<li class=’cart-item’>\n”,
“\t\t”, obj.name, “\n”,
“X“,
““].join(“”);
items.push(str);
}
items.push(“
\n”);
return items.join(“”);
}
$(document).ready(function(){
var TPL_DIR = “”;
var SCRIPT_URL = “download_cart.php”;
//Get table structure of wpdm-pro
var table = $(“.wpdm-filelist”);
var lth = table.children(“tbody”).children(“tr”).first().append(“<th>Aktionen</th>”);
var tableItems = table.children(“tbody”).children(“tr”).not(“:first-child”);
//Add ‘add to cart’ links
tableItems.children(“td:nth-child(2)”).children(“a”).each(function(){
var t = $(this);
var link = t.attr(“href”);
var name = t.parents(“tr”).children(“td”).first().text();
var args = link.slice(link.indexOf(“?”)+1);
args += “&name=” + name;
var markup = “<td class=’action’>In den Downloadkorb</td>”;
t.parents(“tr”).append(markup);
});
//Add download cart markup to sidebar
var mk = [‘<div id=”download-cart”>\n\t<p>Aktuell im Downloadkorb</p>’,
‘<div id=”cart-items”></div></div>’].join(“”);
$(“#sidebar”).html(mk);
/*** AJAX CALLS ***/
//Send AJAX request to get download cart on start
$.ajax({
//AJX REQUEST HERE
});
//Add items on click to cart ad update current cart.
$(“.action”).on(“click”, “a”, function(e){
//AJX REQUEST HERE
});
//Remove item from cart.
$(document).on(“click”, “.remove-itm”, function(e){
//AJX REQUEST HERE
});
}); //DOCUMENT READY END
In the cart (Session) the name, wpdml and ind arguments are saved.
So how can I now acces these files and pack them.
The packing would not be the problem as I can read the class.pack code but I dont know what do do with these
wpdml and ind arguments an how to acces the files through them.
I just buy S3 addon ,I see ‘To activate this feature you need to Configure Amazon S3’, I click it and it redirect me to this url:
http://www.resellrights.com.tw/wp-admin/admin.php?page=file-manager/settings&tab=amazons3
And it shows: You don’t have rights to edit this page.
But I am admin of this site.
How can I fix it?
Thanks.
Eric
by “simply add/attached file as URL.” , I meant to add from here:

Hi,
When selecting the browse tab, the window is blank with no options. The directory url is set in the settings. Even when I manually add the directory nothing happens. Please help.
thank you
Hey Shaon, theme developer here,
ok, so here is the deal.
I will try to explain problem again:
So lets take for example this link: http://teetoolkit.com/?wpdmdl=462 this is the URL that your plugin generates. It links to a file that is on Amazon S3, and its uploaded there with the add-on for your plugin. Now if you try to copy the above link in your browser you will be able to download the file. Which is not good, because I’ve added to the “Allow Access:” section of your plugin option that only Administrator and Subscriber can download that file. But as you can see here, that does not work.
Also MagicMembers are disabled so they are not interfering, I already tried this with the default theme and the result is the same. So please don’t tell me that this is because of MagicMembers or the theme. Because it is not. Something is wrong with your plugin and we want you to fix it, so we can make site go live.
I will not even go into the other problem – which is that the download counter isn’t working for S3 downloads. We’ll deal with that later, after the file protecting issue is fixed.
P.S – download counter and file protection works just fine if the file is hosted on our server, so that’s one more piece of evidence that nothing is wrong with MagicMembers or the theme. The problem is either in your plugin or in the S3 add-on to your plugin. Which ever the case may be, you have to fix it.
Thanks,
Regards,
Ivan Doric
This reply has been marked as private.
Ok, what url am I adding in the app settings?
it is actually no an error with wpdm pro. you simply need to update your facebook app, add the url in fb app settings.
yes, simply add/attached file as URL. That will resolve your issue.
checking categories & previews
wpdm:show_quota
wpdm:show_counter
wpdm:sourceurl
Those fields are not available in pro
you can map uid with post_author
“Add Custom Field” doesn’t support array still now.
Thank you.
Working: wpdm:access
Not working: Categories – The only option in the upload list to map to is “Category”. When I do that it adds the Category in posts. However, I believe you have your Custom Post Type set with a Custom Taxonomy of wpdmcategory to manage categories. So I do not have the option to map categories to that.
Additionaly, The following are not important to me but they are also not in the list of item that can be mapped.
wpdm:show_quota
wpdm:show_counter
wpdm:previews
wpdm:sourceurl (not sure if this is needed)
wpdm:uid (not sure what this is)
wpdm:update_date
Lastly, I see you have “Add Custom Field” as an option in the mapping list. How do I use this and can it be used for an array? For example I have the “Advanced Custom Fields” plugin too and I would like to be able to map to those advance field but they are stored as an array in one custom field called __wpdmpro_custom_fields. Is this possible or could you add something that would handle this?
Thanks again for all your help.
I was about to purchase the PRO version, then I decided to try the demo and I could not figure out how to have a Preview Image show up on the Archive Page and the Search Result…
I created a Test Package with the name:
“Test with Image”
at the URL:
http://demo.wpdownloadmanager.com/wpdmpro/wpdm-package/test-with-image/
I tried reading the forum but found a lot of conflicting info. I see in the demo that some of the examples uploaded by Admin do have a thumbnail preview, but since the demo user can not edit them, I could not see how this was done…. For Example the example image with the title:
“The Burning of the Piper’s Hut”
at the URL:
http://demo.wpdownloadmanager.com/wpdmpro/wpdm-package/the-burning-of-the-pipers-hut/
Can someone please explain how to get the thumbnail preview to show up…. I want to buy the pro version, but I do not have time to mess around with getting preview images to show up… It has to work out of the box.
#6. please show me in a exmaple url
#7. extremely sorry, not clear, may you please explain little more. Anyhow, they need to be registered user to set as post author
#10. you need to add [Eps Bimaye] as submenu from menu manager.
This reply has been marked as private.
This reply has been marked as private.
no, I’ve updated the add-on.
please give me the music page url.
actually add-on doesn’t have anything to do with http headers when it is coming from remote url.
no, now it shares the package url only, anyhow I’ll add the url change option with next update :).
if you want to open, you need to upload file using media uploader, then add the file url with your package, otherwise it always will download.
Please tell me how to fix this error this is really urgent 🙁
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in /home/theinsti/public_html/wowcentral.com.au/wp-content/plugins/wpdm-amazon-s3/wpdm-amazon-s3.php on line 1883
You may use http://awesomescreenshot.com/ for sending screenshot url.
#1. delete free version and install download-manager-4.1.4.zip
#2. Please delete wpdm-m24x.zip, please download migration add-on from here http://wpdownloadmanager.com/download/copy-to-pro/ and install
#3. expo.zip is a theme specially designed for wpdm pro
anyhow if you still need help with setup please send me wp-admin login info in a private reply.
Hello, I have a package that requires the email to get access to download button. Since wordpress 3.9.2 it seems the final page after the submission of email address returns an error all I got now is : {“error”:”<div class=\”alert alert-success\”>Download link sent to your email!<\/div>”,”downloadurl”:””}
Can someone please tell me how to have one download per line other than the [wpdm_package id="package-id-here"] short code?
I would like to list all downloads in a category, one per line as in [wpdm_category id="my-slug-name" template="see below"].
How can I change my link template to do this? Any help would be MUCH appreciated.
<div class=”media-body”>
[icon]
<div class=”media-body”>
<h4 class=”media-heading” style=”padding-top: 0px;border:0px;margin: 0px;”>[title]</h4>
[download_link] <i style=”margin: 2px 0 0 5px;opacity:0.5 class=”icon icon-th-large”></i> [file_size] <i style=”margin: 2px 0 0 5px;opacity:0.5″ class=”icon icon-download-alt”></i>
</div>
</div>
<div style=”clear: both; padding: 20px; 20px;”></div>
This reply has been marked as private.