[Please help] Change "add to cart" function
-
Hi there.
Hoping to find someone who is skilled when it comes to YITH Request a Quote and/or WooCommerce.
I am 70% done with changing the the “Add to cart” function to “Request a Quote”. Currently you can only add products to quote when you are on the product page itself, all works great on that note. On my website however, I have “Latest products” and product categories where previously, an “Add to cart” button would appear when you move the cursor over a product.
I am now trying to change this button’s function to instead of adding the product to cart, it gets added to quote.
In content-product.php I see the following:$link = apply_filters( 'add_to_cart_url', esc_url( $product->add_to_cart_url ) ); $label = apply_filters( 'add_to_cart_text', __('ADD TO CART', THEMENAME) ); break; } if ( $product->product_type != 'external') { $zlink = '<a href="'. $link .'" rel="nofollow">id.'" class="add_to_cart_button product_type_'.$product->product_type.'">'. $label.'</a>'; } else { $zlink = ''; } }I’ve tried a lot of different things but I am really desperate for help. Here is the link to the plugin which I want to replace the cart with: https://ww.wp.xz.cn/plugins/yith-woocommerce-request-a-quote/
You can check out github for shotcodes etc. of the plugin here: https://github.com/wp-plugins/yith-woocommerce-request-a-quoteReally hoping for some help! This has driven me crazy 🙁
The topic ‘[Please help] Change "add to cart" function’ is closed to new replies.