Skip Navigation

[Resolved] Which shortcode for WooCommerce Plugin Default Templates add to cart button?

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 25 replies, has 3 voices.

Last updated by StanleyT8485 5 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#1189330

I am trying to: Show the add to cart button for WooCommerce Plugin Default Templates.

Link to a page where the issue can be seen: Localhost

I have tried both [wpv-woo-buy options] and [wpv-woo-buy-or-select] but both don't show the original add to cart button.

MORE INFO
I am using a plugin that switches the original add to cart button to another action. When I use the WooCommerce Plugin Default Templates, that button shows up. When I switch to WooCommerce Views plugin default single product template, it doesn't show up and I can't find the shortcode to make this button appear.

#1189732

Hello, which 3rd-party plugin are you using to modify the original Add to Cart button?
When you switch to the WCViews single product template, are you able to see information from other shortcodes, like for instance the wpv-post-title shortcode?

#1190026

It isn't on the WordPress plugin repository.

Yes, I can see the shortcode. The shortcodes are working fine but I can't find the shortcode for the add to cart button that is used in the WooCommerce Plugin Default Templates.

When I use the WooCommerce Plugin Default Templates, that button shows up. When I switch to WooCommerce Views plugin default single product template, it doesn't show up and I can't find the shortcode to make this button appear.

#1190479

There's no other shortcode available to display an add-to-cart button. The Views shortcodes for add-to-cart buttons are basically just copies of the original WC functions. Perhaps the shortcodes available in WooCommerce Views are hooked in earlier or later than your other plugin's button modifications, so they override that plugin's functionality? Perhaps the original button you described is formatted based on your theme or another plugin somehow? I can work with a clone of your site to see exactly what is happening. I will activate a private reply field here so you can share a Duplicator clone download link.
https://toolset.com/faq/provide-supporters-copy-site/

#1190801

I have attached a dropbox link of our duplicator export.

#1191600

Sorry, I didn't receive the link. Can you please submit the download link once more?

#1192318

I have attached the link again.

#1192651

Still nothing... can you place the link in the main comment area? URLs are obscured on the site, so the link will remain private.

#1192826

hidden link

#1192830

Got it, thanks. I will take a look and report back to you soon.

#1193125
add-1.png
add-2.png

Okay I've got the clone installed and I'm able to see the site. First, I deactivated all the plugins except Types, Views, and WooCommerce. Then I activated Twenty Nineteen, the default theme. I visited this Product on the front-end:
/product/media-wall/
I'm attaching what I see for the add-to-cart button as add-1.png.

Next I activated WC Views, and selected the WC Views plugin default single product template. I reloaded the Media Wall post on the front-end, and I'm attaching what I see now as add-2.png.

The buttons are identical in terms of color, size, font and interaction effects. There are some layout differences in the options for choosing the Frame and quantity, and the overall positioning of the product image gallery, but those can be adjusted with CSS if necessary. You mentioned that you're using another plugin to customize the Add-to-Cart button. Which plugin or plugins should I activate to see this customization?

#1193395

It's Aurigma Personalization plugin.

#1193863

Okay got it. When I activate that plugin I see a "Personalize" button instead of the standard add-to-cart button. I see the same thing whether or not I have Toolset plugins active, so I'm not sure there's much I can do here. Since WooCommerce Views basically reuses the standard WooCommerce add-to-cart button functionality, it's not surprising that the personalization plugin affects the WCV buttons as well. It seems that this plugin is overriding the functionality of the standard WooCommerce add-to-cart button with their own filters. You would have to ask this plugin's supporters or developers if there is a way to bypass that plugin's functionality for specific add-to-cart buttons, because I have no idea how their software is setup. It may or may not be possible.

#1194014

Can toolset customize the template for WooCommerce Plugin Default Template? That template works perfectly with the Aurigma plugin but we just need to customize how it looks.

#1194989

No, that's not quite how it works. WooCommerce Views gives you the ability to design your own template but it doesn't inherit or import the existing template as a starting point. With that being said, you can certainly activate the default template, copy the HTML markup generated on the front-end, and paste it into the Content Template you can set to single Products with WooCommerce Views. Then replace the hard-coded information with Views shortcodes, like wpv-post-title for the Product Title.