How to generate a link after order in woocommerce after order completed? - woocommerce

can I add php code to generate an html link after the woocommerce order is completed?
This is the html link I expected to generate
https://ssl.smse.com.tw/api_test/SPEinvoice_Storage.asp?Grvc=SEI1000034&Verify_key=9D73935693EE0237FABA6AB744E48661&Name=customerid&Phone=0900000000&Email=Test#testmailserver.net&Intype=07&TaxType=1&LoveKey=&DonateMark=0&Description=product&Quantity=5|8&UnitPrice=10|15&Amount=50|120&ALLAmount=170&InvoiceDate=2022/11/23&InvoiceTime=15:33:33

Related

Woocommerce tags in search results

I'm trying to include in search results, results matching also product tags. By default it shows results matching product title / description.
Is it possible to add saerching via product tags? How can I do that?
Be default you can not search by product tags. You have to edit you search query backend code to achieve searching via tags as well.
This widget might be close to what you need: https://docs.woocommerce.com/document/woocommerce-product-search/widgets/product-filter-tags/

Woocommerce add to cart and redirect to Custom URL - Different for each link

So I am using a link on this page: https://www.revealio.com/make-brand-come-alive/ (yellow button).
The link is supposed to add the product to the cart and then send them to the next step in the sales funnel.
For the link URL I used:
https://www.revealio.com/help-creating-video?add-to-cart=4951
and
https://www.revealio.com/help-creating-video?add-to-cart=4951&quantity=1
Full link code is:
YES! MAKE MY BRAND COME ALIVE!
I found this code here: https://businessbloomer.com/woocommerce-custom-add-cart-urls-ultimate-guide/
If you need to see the cart (we are still redesigning these pages) you can go here in a seperate browser tab to see how it updates: https://www.revealio.com/cart/
The problem is that it is adding 2 products to my cart instead of 1.
How can I get this to just add one of my products to the cart and move on?
Here is something new I found out. If I just go directly to the link it only adds one product. If I click on the link in the page (https://www.revealio.com/make-brand-come-alive/) it adds 2 products. It does the same for a button or a text link.
Use the shortcodes provided by WooCommerce to render the add to cart links. https://docs.woocommerce.com/document/woocommerce-shortcodes/
[add_to_cart_url id="99"]
I found it!
It needs a / before the ?
https://www.revealio.com/help-creating-video/?add-to-cart=4951
I was using: https://www.revealio.com/help-creating-video?add-to-cart=4951 which gave two item in the cart.

Woocommerce zip code issue

In woocommerce on checkout page after filling complete billing and shipping information, goes to cart page or any other and return to the checkout page all information get wanished only zip code remains, how to clear zip code also?
You need to use Javascript/jQuery to reset the value of the zipcode.
document.getElementById('zipcode').reset();
If you are using any click event then you must try the following code also.
onClick="window.location.reload()"

Woocommerce Remove Fields from the View-Order page

I'm using woocommerce version 2.4.6 if that's helpful at all. I'm trying to modify the view-order page of a specific order. The web address would be something like:
http://www.edventurelearning.com/my-account/view-order/244/
The page lists the status of the order, the order details, customer details, and then the billing address. I'd like to remove the billing address section since I don't collect the data and all the payments are done through paypal.
I'm having trouble figuring out how to get rid of the Billing Address field from showing up on the page. (I've already removed the field from the checkout process). view-order.php is the file that creates the page and I can modify it but the code that creates all the order detail sections is lumped into:
do_action( 'woocommerce_view_order', $order_id );
I've found the woocommerce_view_order function which is called by woocommerce_order_details_table which is called by wc_get_template. At that point I get lost and I figure there has to be an easier way to modify what is displayed. All I need to do is remove the Billing Address section.
Thanks for any help.
I posted this in the woocommerce forums and one answer was:
An easier way is to hide it using custom css. I can't see your view order page as I'm not a customer and haven't bought anything, but on my site I would use:
.woocommerce-view-order .woocommerce header.title,
.woocommerce-view-order .woocommerce address
{display:none}
Not very subtle but at least there is no need to maintain a custom version of the relevant template.
That post can be seen here:
Wordpress Forum

How can I hardcode the Nextpage tag into a Wordpress theme file?

I have a custom post type for a Slideshow which uses Custom Post Meta to insert the different slides. How can I code the <!--nextpage--> tag in between the sides in my slideshow.php so that they slides will paginate? Right now when I try to do it the code doesn't show because it by it's nature it commented out.
If the slides are each separate custom posts, the <!--nextpage--> tag won't work anyway. <!--nextpage--> is designed to add pagination to long posts ... i.e. break a long, single post (or custom post type) over multiple pages.
From the sound of things, you want a pagination setup that will work for multiple individual custom posts.
What you want is the PHP function next_post_link(). This "template tag displays a link to the next post which exists in chronological order from the current post."

Resources