srlimon
Forum Replies Created
-
Rockstar!
The ajax error was fixed when I uninstalled my other side cart plugin (just deactivating it didn’t help) all working perfectly now.
Upgrading to pro version, your support has been awesome.Legend. Worked like a charm!
With my rudimentary php skills I managed to adapt your code to 1 unique product with:add_action('wjufw_add_to_cart_parameters', function( $prod ){ if ($prod->get_id() == '12629') { $url = get_permalink( $prod->get_id() ); echo "href='". $url ."' class='button product_type_simple'"; } });Any idea how to trigger this Action on all products of a product category?
I tried the below without sucess:add_action('wjufw_add_to_cart_parameters', function( $prod ){ $prod_cats = wc_get_product_category_list( $prod->get_id() ); foreach (wc_get_product_category_list( $prod->get_id() ) as $prod_cat) { // if ( has_term( 'Cards', $prod_cat ) ) { if (str_contains('Cards' , $prod_cat )) { // if (strpos('Cards' , $prod_cat) !== FALSE) { $url = get_permalink( $prod->get_id() ); echo "href='". $url ."' class='button product_type_simple'"; } } });This plugin now does what I need, any chance you’re available to look on the ajax loading error if I give you admin rights? at staging9.thefunguywa.com.au
How would I do it, even if is suing a filter or hook?
Same hapenning to me on deleting a item from side cart.
URL https://www.staging9.thefunguywa.com.au/Yes, redirect to product page with custom text (either defined by specific upsell, or product or product category)
This is useful for variable products when customer need to choose options (T-shirt size for example) prior to add to cart.See live example
https://www.staging9.thefunguywa.com.au/On all pages I removed the “add to cart” buttom/function and replaced to “customeze” & linking to product page with this on my functions.php
add_action( 'woocommerce_is_purchasable', 'hide_add_to_cart_function', 10, 2 ); function hide_add_to_cart_function( $return_value, $product ) { // Remove only if Cards category and is not on single product page (removes from shop, home, categories, etc) if ( has_term( 'Cards', 'product_cat' ) AND !is_product() ) { return false; //will replace badd to cart to "rad more" linking to single product page } return $return_value; } //replace text on "Add to cart button" to "Customize" add_filter( 'woocommerce_product_add_to_cart_text', 'custom_replace_read_more' ); function custom_replace_read_more( $text ) { global $product; // if ( $product && ! $product->is_in_stock() ) { if ( has_term( 'Cards', 'product_cat' ) ) { return 'Customize'; } return $text; }ohh 🙁
This plugin covered almost all my needs. I’ll still research on how I could implement it to my needs and purchase the paid version.Please consider this a feature on future development, as one might need for variable products, even on your demo website, to take customer to product page and “custom to add”
Brownie points if this can be configurable by each upsell.