@kaavain, thanks for getting in touch with us.
Our plugin WooCommerce Catalog Enquiry, enabled the “catalog” mode for a site. In order to do that, we disable the “Add To Cart” button.
So, in order to reuse that, you have to increase the priority of the Add to the cart by doing a bit of code.
ALternately, you can sue the WooCommece Catalog Enquiry Pro (https://wc-marketplace.com/product/woocommerce-catalog-enquiry-pro/), this plugin provides an option to enable the “Add To Cart” back again.
Let us know if you have any further query.
Dear Sirs
Thank you for the replay, it was fast but not exactly the answer. Let me explain:
– hidding “add to chart” is great, I need it.
– my button was NOT “add to chart” it was transformd FROM “add to chart” but it is NOT, it is just a link to the single product page.
So the behavior of your plugin was wrong. I think the blame is on my programmer – he left a lot of properties of “add to chart” button so it mislead your plugin and it hided “wrong” button.
So, I would be thankful to you if you’ll explain me HOW your plugin determine that the button is “add to chart” – we’ll remove this property from our button and it will be back aain.
-
This reply was modified 5 years, 10 months ago by kaavain.
@kaavain, provide us a working link and button where we the hook has been added.
@dualcube, the button disappeared after you great (really great, it do its job perfectly) plugin was enabled. The link where now it is disappeared is http://www.jetcom-3d.ru/production-3d-printers/ and the button code was
Подробнее
But, again, ypur plugin works fine. It was fault of my programmer who left the button like it is “add to chart”.
If you’ll tell me how your plugin check the button, may be I could fix it.
@kaavain, we are not able to find the “Add to Chart” in the link. So, can you please share two screenshots, one deactivating the Catalog Enquiry and keeping this activated. Then highlight the part that should deactivate and the one should not be deactivated. This will help us understand this and help you out further.
@dualcube Thank you for your will to help me, I’m really appreciate it. But, of course, now the “add to chart” is missing, because your plugin is activated. To get it back I need to deactivate your plugin. This action I’m afraid to do because it is working site and I’ve started translation of your plugin so I do not want to loose it. But the thing is simple, now the block where we the button I need looks like this (I’ve removed not iimportant code)
<li class="post-168 product type-product status-publish has-post-thumbnail product_cat-production-3d-printers first instock shipping-taxable product-type-simple">
… some code here - image and other …
<a class="fancybox-inline button" href="#contact_form_pop">Сколько стоит?</a>
… hidden block with contact form here …
</li>
Before your plugin was activated it was second button there, it was NOT add to chart but looks like this – the fault of my programmer. This button iwas mean “more details” and had just a link to product page….
<li class="post-168 product type-product status-publish has-post-thumbnail product_cat-production-3d-printers first instock shipping-taxable product-type-simple">
… some code here - image and other …
<a class="fancybox-inline button" href="#contact_form_pop">Сколько стоит?</a>
<a href="http://www.jetcom-3d.ru/production-3d-printers/conceptlaser-m2-cusing-multilaser/" data-quantity="1" class="button product_type_simple ajax_add_to_cart" data-product_id="470" data-product_sku="" aria-label="Прочитайте больше о “ConceptLaser M2 cusing Multilaser”" rel="nofollow">Подробнее</a>
… hidden block with contact form here …
</li>
We unstood that you want to display this field “Подробнее“,
However, as we don’t know which hook/filter has been used by your programmer from these threads, so we are shaing the following code snippet that should add the button. Please add this code in the function.php of the currenct active theme :
add_action('woocommerce_after_shop_loop_item', 'woocommerce_after_shop_loop_item', 11 );
function woocommerce_after_shop_loop_item(){
global $product;
if ( $product ) {
echo '<a href="'.$product->get_permalink().'" data-quantity="1" class="button product_type_simple ajax_add_to_cart" data-product_id="470" data-product_sku="" aria-label="Прочитайте больше о “ConceptLaser M2 cusing Multilaser”" rel="nofollow">Подробнее</a>';
}
}
Great and many thanks! It works.
-
This reply was modified 5 years, 10 months ago by kaavain.
You are welcome 🙂
I hope you are satisfied with our assistance. A 5/5 review here- https://wordpress.org/support/plugin/woocommerce-catalog-enquiry/reviews/#new-post, would be a great way to share your experience with others. It only takes a minute or two.
This motivates us to continue providing the best experience possible and also helps others know how WC-Marketplace can make their life easier.
Just did it.
$product->get_permalink() this gets link to product page. Which get_???() returns product name?
Hi Team,
Can you give me the code for raising the priority of Add to cart button because I need to display both enquiry and add to cart button on the product description page.
Thanks!
-
This reply was modified 5 years, 10 months ago by sagar1990.
Hi , you can know more on this “$product->get_permalink()” via – https://www.google.com/url?q=https://docs.woocommerce.com/wc-apidocs/class-WC_Product.html&sa=D&source=hangouts&ust=1529570573814000&usg=AFQjCNFZiTZhszQ72POCI0clprxi3ddwCQ
@sagar1990, please follow the code we have shared and create your custom code as per that. Alternatively, you can switch to the Pro version: https://wc-marketplace.com/product/woocommerce-catalog-enquiry-pro/. This plugin lets you activate both the “Add to Cart” and “Enquiry” option in the product description page.