Allow download on shop / archive pages ,Whether the button can be changed to a text link?
Because text links can be with my theme。
Home > Community > Forums > Free Downloads WooCommerce Pro
27th June 2019, 8:55 am
Allow download on shop / archive pages ,Whether the button can be changed to a text link?
Because text links can be with my theme。
Hi mate they are already text links on shop/archive pages. What are the class names for your theme that you want to apply to the download buttons on these pages? You could add some custom code that would overwrite the default behaviour of adding the woocommerce classes, if you know what you're doing.
add_filter( 'somdn_get_button_archive_classes', 'somdn_get_button_archive_classes_woo_custom', 20, 1 );
function somdn_get_button_archive_classes_woo_custom( $classes ) {
return 'your_class';
}
The button code for the theme is:
<a rel="nofollow" href="/shop/?add-to-cart=138" data-quantity="1" data-product_id="138" data-product_sku="" class="button product_type_simple add_to_cart_button ajax_add_to_cart"><i class="p-icon icon-bag2" rel="tooltip" data-original-title="加入购物车"></i><span class="add-to-cart-text">加入购物车</span></a>
The button code of the plugin is:
<div>
<div class="somdn-download-wrap">
<form class="somdn-archive-download-form somdn-download-form" action="/product/ether-chair/" method="post" id="somdn-download-single-form">
<input type="hidden" name="somdn_download_key" value="MTU2MTc0NTI5MQ==">
<input type="hidden" name="action" value="somdn_download_single">
<input type="hidden" name="somdn_product" value="112">
<a rel="nofollow" href="/product/ether-chair/" class="somdn_get_button_archive_classes somdn-download-archive single_add_to_cart_button button">Download</a>
</form>
</div>
</div>
screenshot:
http://www.3domg.com/1.png
http://www.3domg.com/2.png
Do you need to modify the plug-in code if you change the theme style?
Tell you what, post a link to your site and I'll see if I can make you some custom code.
http://www.3domg.com/shop/
Ok mate leave it with me.
This topic is closed to new replies.
Looking for Square One Media? Check this post
@tianfuxi
8:55 am