You need use
<a href="[addtocart_url]" class="btn btn-primary">Buy Now @ [currency][base_price]</a>
in link / page template for that.
And in php, that should be:
<a href="<?php echo home_url("?addtocart=".get_the_ID());?>" class="btn btn-primary">Buy Now @ <?php echo wpdmpp_currency_sign().wpdmpp_effective_price(get_the_ID()); ?></a>
To use file cart plugin, you simply need to use [file_list]
tag in page template, and equivalent php code is:
<?php
$package = \WPDM\Package::Get(get_the_ID());
echo $package['file_list'];
?>
Don’t worry, you are not troubling at all, we are more then happy to assist you anywhere you need around the plugin 🙂
HI Shaon,
Thanks for your efforts — you definitely got rid of the duplicate button. However, the look I wanted was what I had set up with my other template. I had modified another existing template, and ended up with two download links….and now, I can’t figure out what was wrong with it, to cause the duplicate. What I really need is a fix to the template I made, not a new template to modify (and perhaps ruin).
Can you please look at my template code here, and see what is wrong with it?
<div class="panel panel-default">
<div class="panel-body">
<div class="media">
<a class="pull-left" href="[page_url]">
[thumb_60x60]
</a>
<div class="media-body">
<h4 class="media-heading" style="padding-top: 0px;border:0px;margin: 0px;height: 20px;overflow: hidden">[page_link]</h4>
[excerpt_160]
</div>
</div>
</div>
<div class="panel-footer"><div class="pull-left" style="line-height: 30px;"><i style="margin: 2px 0 0 5px;" class="icon icon-download-alt"></i> </div> <div class="pull-right">[download_link]</div><div style="clear: both"></div></div>
</div>
Hi there, i’ve just setup WP Download Manager on my site and i’m looking to configure the following, I wonder if you could see anything wrong with this setup idea:
1. Local Box Sync’d Files/Folders > FTP Auto Uploaded Daily To Site Server
2. Setup a selection of packages in WPDM with the url’s set as the files on the server. (I plan on adding the bulk via a .csv upload with the urls set as the files field, will this work?)
Note: The reason for this was so that when files are changed in our Box folders as long as the file names are the same they will update and therefore we can keep version control in Box but we do still have to manually manage version control in WPDM, our files arent changed really frequently maybe once a quarter.
Question 1: Do you think this is going to be my best bet for this type of file management?
I tried the BOX plugin but it was a very long process using the Box explorer window to go and find all the files and set them as packages and things, this way although I have a local machine running 24/7 in the office it will handle the Box files sync’d locally with ftp uploads every 24hrs overnight.
Question 2: I’d like to try and achieve the following type of access request for my files. Can you advise if it’s possible?
Files are password protected > User Enters Email > Email is reviewed and approved or denied > User is sent an email either issuing the file password or not.
I could setup a form on the category/file template pages that has contact form 7 forms requesting the password for the packages but as I am going to have around 10 categories and maybe 2000 files this could take a long time to add them all manually to each package template. Also it will mean passwords being copied and pasted by my office staff who will be reviewing the emails.
I’m pretty sure that one way or another i’m close to achieving the setup i’m after but I thought it might be a good idea to run it past you guys first, any advice is appreciated and congrats on what so far seems to be a pretty awesome plugin!
Thanks,
Ben
Check if category url base from WPDM Basic settings match with your category url base in browser address. Or, Send login info in private reply. I will check this issue for your there.
1. When you add a file using URL, that file has to be available publicly, otherwise download won’t work.
2. Have to check this issue (Download doesn’t work for attached file), It might be an user restriction issue form package settings.
3. Send login info in private reply to check this issue.
Hi, I test three options to download a file but I can’t, I add a url to download a file that is in my hosting but not in the same folder of my website, and when a user try to download receive the error download limit exceded without download the file, I try attached the file and the same, and try in the browser tag an the same problem, I config just one download for user, and for test I set 2 download and I always can to download the file, so what can I do please?
This reply has been marked as private.
This reply has been marked as private.
It appears the Form Lock add on using Gravity Forms has some jQuery issues when used with the Archive Page add on.
I am seeing a JS error when the page loads:
Uncaught ReferenceError: gformInitSpinner is not defined
When you try click download inside the popup, three jQuery errors show:
Uncaught ReferenceError: jQuery is not defined
Uncaught ReferenceError: jQuery is not defined
Uncaught ReferenceError: jQuery is not defined
The form however works fine when used from the individual file page.
I can provide URL on request.
Thanks.
This issue was created by cache plugin. It was caching download url for guest users, but those urls are unique and that’s where the issue created. However after adding some rules for download urls it is working now.
It is happening because of different post title length, you may need to add some custom css, however, please give me your url if you want me to suggest required css change 🙂
Sorry, not clear, may you please give me some mockup image, a rough drawing, how you want to make it or url of any other similar system.
However, after creating a package, you can again add new file later with that package.
But wpdm doesn’t add any such button. However please give me your url to check.
Hello Michael,
1. I have found a bug in advanced tinymce button after checking your issue. Replace link_template
by template
in shortcode, i.e. your shortcode would look like following one,
[wpdm_packages template="link-template-calltoaction4" order_by="post_title" order="asc" paging="asc" items_per_page="10" title="" desc="" cols=1 colsphone=1 colspad=1]
Will fix it in next addon update.
2. [wpdm_tree] shortcode is working fine in our test. Please send me the page url where you have this shortcode.
Thanks
Shahriar
Actually it is not in our plugin scope, still I’ve done it for you, use following code:
class PackagePermalink{
function __construct()
{
add_filter( 'the_permalink', array($this, 'Permalink'));
add_action( 'pre_get_posts', array($this, 'ParseURL') );
}
function Permalink($url){
return str_replace(get_option('__wpdm_purl_base').'/',"", $url);
}
function ParseURL( $query ) {
// Only noop the main query
if ( ! $query->is_main_query() )
return;
// Only noop our very specific rewrite rule match
if ( 2 != count( $query->query ) || ! isset( $query->query['page'] ) ) {
return;
}
// 'name' will be set if post permalinks are just post_name, otherwise the page rule will match
if ( ! empty( $query->query['name'] ) ) {
$query->set( 'post_type', array( 'post', 'page', 'wpdmpro' ) );
}
}
}
new PackagePermalink();
Hi Shahriar, the package_dir isn’t working anymore. Even if i add a URL by hand within the dashboard, the packages aren’t automatically added within the folder. Did something change?
Here i added two classes ( btn and btn-primary ) to add button style in my download link,
<a class="btn btn-primary" href="[download_url]" target="_blank">[link_label]</a>
This reply has been marked as private.
HI, i just updated with the wpdm 4.4
But i have some errors:
1. the ftp external is not working, why? In addition it is suppose to not save chache, what do i have to check?
2. All files are only allowed to specific users : so they have to log in and the can download files. But if i copy the url of the file and paste it in other browser without login i can also download the file!!! How is that possible?
Thanks!!!
If you are using remote url for all 3 files, then zip will be empty, because, remote files in attached file list can’t be added in zip, as files need to be stored in same server to create zip file.
Actually the plugin convert each pdf page into image, then show it, but it is actually out of wpdm scope, however you may use the plugin and create a wpdm add-on to introduce new template tag for pdf embedder.
Example code:
<?php
add_filter('wdm_before_fetch_template','custom_pdf_embedder',10,1);
function custom_pdf_embedder($vars){
$vars['embed_pdf'] = do_shortcode("[pdf-embedder url='{$vars['download_url']}' ]");
return $vars;
}
?>
Now you can use [embed_pdf]
as template tag in link/page template
This reply has been marked as private.
This reply has been marked as private.
Hi Sir,
I would like to know how to upload files from the frontend?
Do I have to install any add on?
What is the URL to access to frontend upload page?
Thanks.
Michael