Change woocommerce add to cart button to normal link - woocommerce

I would like to replace the Add to Cart button in woocommerce to a button that links to the "file url"specified for all downloadable products. I did find some plugins like "download now", but they expect an actual file while i often entered an url pointing to an external html page as file url instead of the actual file url.

You need external products instead of downloadable products. There are many plugins in the market which supports external products.

You can use default woocommerce feature. Follow these steps:
Make product Virtual & Downloadable
Goto Woocommerce >> Settings >> Products >> Downloadable products
Here for "File download method" option select redirect only
This will work as you want!

Related

is there a function in woocommerce to get email attachment download link

I am a WordPress developer and using woocomerce hook woocommerce_email_attachments to attach a file with completed order email
This works fine , it attaches the required file
But I want to get that downloadable link of particular attachment , so i could use it in the email template anywhere instead of having it at the bottom of the email
(So when user clicks the link it should download that attachment)
I tried reading so many woocommerce classes but unfortunately couldn't find any function that returns the download link of attachment
Thank You

Is there any plugin or add on for adding a file uploader into the wooCommerce product page?

I am looking for a plugin or addon for adding a file uploader into my product page.
As my client is selling something that should require some kind of certificate or evidence, this would request the user to upload the pics or files when they want to add something into the cart.
I've found a solution is to add the meta attribute for the product and then add the file uploader into the product page. But my project leader denied my solution, he wants me to search for some possible plugin or add on first.
What I need to is like, I need to find a plugin or add on which could enable me to add a file uploader on the product page when the customer is placing the order. The file will be included in the order because my client will not directly charge the money from the customer, once my client check that the evidence or certificate is valid, the money could charged and the good could be shipped.
I've done some search and I think just add a meta attribute is easy, but my leader denied this. So I am coming to ask some help.
Thanks.
You could use a plugin like this https://codecanyon.net/item/woocommerce-custom-fields/11332742
It's a paid plugin though.
I think, there is too many plugins (free or paid) are available to customize WooCommerce product page.
But File Upload option may only available in premium plugins.
Can you please check themehigh's WooCoomerce extra product option plugin?.
I have tried that plugin for one of my client. The options available in product page are File Upload, Text, Hidden, Password, Textarea, Radio, Checkbox, Select, Multi-select, Date picker, Time picker, Heading & Label etc.

woocommerce dynamic pricing hide regular price

I am using dynamic pricing plugin to configure products price based on the role. It works fine from the functionality perspective. But it displays both the regular price and the configured price on the screen. I am wondering that is there a way to hide the regular price and only shows the configured price?
(With the regular price that's more like a discount or products on sale but they are not. They are just the actual price for a certain role. )
I hope this may help you, if you are using Woo-commerce plugin:
Go to woocommerce plugin &copy the templates folder & paste in your theme folder.
Rename that templates folder name with woocommerce name in your theme folder.
open the newly named templates folder i.e. woocommerce folder & go to loop folder & open the price.php file & comment the code according to your requirement. This will hide price on the products page.
Now open the single-product folder & open the price.php file & comment the code according to your requirement. This will hide the price tag on your single product page.
You can hide the div that is displaying the deleted price.
p.price>del>span.woocommerce-Price-amount.amount
{
display: none !important;
}
This should hide regular price from woocommerce. Add to additional CSS.
.price>del>span:nth-child(1)
{
display: none !important;
}

How to programmatically enable reviews and ratings in WooCommerce products?

I have enabled Reviews from the Dashboard but they are not appearing in the front-end of my site. This could be an issue with the theme itself. Is there a function that displays the reviews and ratings section within my theme?
It's the /plugins/woocommerce/templates/single-product/review.php that needs to be displayed on the product pages but it's not showing at all.
There's a few layers at work here. A few things you should check, in order of most likely to least likely culprit:
Is another setting in the dashboard hiding the reviews tab? There are other options below the "Enable reviews" checkbox. Review those, as they can hide the tab based on your front-end viewing user privileges.
Is the review tab just getting hidden by CSS in your theme? Go to the page's source code in Chrome Inspector (or whatever browser tool you're using) and CTRL+F "review" and cycle through any hits. If you find elements in the page body with "review" classes or ids, check to see if they're hidden, and if so, whether they're hiding the reviews tab.
Is the reviews tab being hidden in the source code by a hook? Search your entire project's source code (including plugins) for hooks that may be un-setting the reviews tabs. For example:
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30);
remove_action( 'woocommerce_product_tab_panels', 'woocommerce_product_reviews_panel', 30);
Are your theme's override templates removing reviews? Check the /theme/woocommerce/content-single-product.php file to see if it's markedly different from the base WooCommerce template, for instance not executing do_action( 'woocommerce_single_product_summary' )
Did your WooCommerce base templates get altered? Check for the same in the plugin files directly.
There are 3 components to enable reviews on WooCommerce.
Enable comments in WordPress
Enable Reviews in WooCommerce
Enable reviews in the product
I will only discuss the third option which is not as documented on the web.
As of Woocommerce 3.7.0 (maybe even earlier), if a product was already created and then you enabled the review settings, then the product will have the reviews DISABLED. You must enable them on each product.
Manual:
Go to the Products->All Products menu on WordPress.
Click "Quick Edit" on a product. You will see a "Enable Reviews" checkbox just below the Product tag field. Check it.
Automated:
Got to phpMyAdmin and run a SQL command:
UPDATE wp_posts SET comment_status = 'open' WHERE post_type = 'product';

Can the administrator attach a file to a Woocommerce order?

I was wondering what the best way to achieve the following:
Customer makes an order (normal functionality)
Once order is placed, the admin needs to upload a pdf attachment related to the order
The customer can then view the attachment(s) when viewing the order
I can see there are plugins where the custom can upload supporting files, but none that cater for the admin to do this.
Why not add a new custom field for that product?
(source: chizzledesigns.com)
So once your client generates the PDF they can upload it just like normal into the media gallery and add the link (or at least the file name) into the Order PDF field for that specific order.
Next you would need to decide how to show the user that in your theme but querying for that meta value should not be difficult.
With default woocommerce functionality the main way to do this is to create virtual downloadable product (but not available on shop pages) and upload your pdf file there. Then when the order would be ready, you should grant access to that virtual product at the order edit page.

Resources