Jeff Alvarez
Forum Replies Created
-
Sorry for the confusion, yes in most cases it should get the product ID automatically, I forgot to mention that you can test the snippet by manually adding the product ID.
In most cases adding the snippet to your functions.php without any changes and it should fix most of the issues with the side cart not showing the wholesale price, if it doesn’t work on your end please reach out to the Elementor team to help complete the snippet and get it working with their side cart feature.
- This reply was modified 1 year, 8 months ago by Jeff Alvarez.
hi @hesaplar ,
Please give this snippet a try:
add_filter( 'woocommerce_cart_item_price' , function( $price, $cart_item, $cart_item_key) { global $wc_wholesale_prices; $wwp_wholesale_role = $wc_wholesale_prices->wwp_wholesale_roles->getUserWholesaleRole(); if( !empty( $wwp_wholesale_role ) ) { $wwp_wholesale_prices_instance = new WWP_Wholesale_Prices( array() ); $product = wc_get_product( $cart_item['product_id'] ); // replace with product id $get_price_html = $product->get_price(); if( $product->is_type( 'variation' ) ) { $parent = wc_get_product( $product->get_parent_id() ); $get_price_html = $parent->get_price_html(); } return $wwp_wholesale_prices_instance->wholesale_price_html_filter( $get_price_html , $product , $wwp_wholesale_role ); } return $price; } , 10 , 3 ); global $wc_wholesale_prices; add_action( 'woocommerce_before_mini_cart_contents' , array( $wc_wholesale_prices->wwp_wholesale_prices , 'recalculate_cart_totals' ) );
Note that you may need to update this part of the code $product = wc_get_product( $cart_item[‘product_id‘] ); to the product you were adding to the cart in the snippet.
You can get the product ID by editing the product in the backend and looking at the URL: https://prnt.sc/91ZAnf3BEYJN
Alternatively, you could try out 3rd party mini cart or side cart plugins available on the WordPress plugin repo: Side Cart Woocommerce (Ajax) – WordPress plugin | www.remarpro.com
hi @thelaserclinique ,
Sorry, I don’t quite understand the issue you are facing.
But reading between the lines you are wanting the customer to buy a hardback book and in turn get a free paperback book. You then set the hardback book in the customer buys section and the customer gets section the free paperback.
Now in cart, I assume that even though it has a hardback book in the cart it’s not giving the free product? Can you please confirm on customer buys that it’s using specific or others, Screenshot by Lightshot (prnt.sc)?
If you have it set to specific then it’s likely not working as intended as the customer must buy the mentioned/set hardback of 1 each. If you’d want it to read any hardback set it to Any Combination of Products
Let me know how it goes.
Hi @carmen2021 ,
That error could be due to plugin conflict or theme conflict. Please try running some basic debugging. For reference read here: How To Conduct A Basic Debug For Wholesale Suite – Wholesale Suite (wholesalesuiteplugin.com)
If you only have Woocommerce and Wholesale Prices with a compatible theme like storefront and still face issues, please try re-installing our plugin.
Hi @startechmarketing ,
Sorry about that, may I know which documentation you were pertaining to? A link to it would be great.
We’ll take a look and apply appropriate updates. Looking forward to hearing from you.
Cheers,
hi @samefc4 ,
Please add the following CSS to your website, you can do so by going to Appearance > Customize >Additional CSS
If everything goes well, it should look like this: Screenshot by Lightshot (prnt.sc)
.original-computed-price{
text-decoration:none !important;
opacity:1 !important;
}.original-computed-price:before{
content: “Retail Price: “;
}Hi @cikytheoriginal ,
I’ll assume you were pertaining to the manual order in Woocommerce > Orders > Add Orders
If so, I’m afraid we currently do not support this but there’s a workaround this by using a 3rd party plugin: User Switching – WordPress plugin | www.remarpro.com
Essentially, you’ll switch to the user and order on the frontend, since it’s treated like a regular wholesale order the wholesale settings and price is followed.
For more information: Can I Order On Behalf Of My Wholesale Customers? – Wholesale Suite (wholesalesuiteplugin.com)
Let me know if you have other questions.
Hi @dabesa ,
I’d suggest running a basic debug to check for conflicts, you can easily check this by disabling all other plugins excluding Advanced Coupons & Woocommerce, while at it also trying temporarily changing themes to the storefront or 2021 theme. You could also try re-installing our plugin.
In most cases, if the store credits do not apply it’s likely a conflict somewhere.
Generally, store credits should be shown like this when applied: https://www.loom.com/share/d0c1f1f3d6a449b495b3f37cf7bd0602
Hi @dabesa ,
Based on the screenshot I assume it’s based on the order summary? If so, I believe the customer is using a regular coupon instead of store credits.
On the order summary, it should look like this: https://prnt.sc/00PGlePmnO4g
If it’s the regular checkout then it shouldn’t say Coupon: store credit but say something like Store Credit Discount
From the image, it seems to be a regular coupon that’s not discounting anything, it also further supports this as it states the word Coupon. Can you please go through your coupons and see if there’s a coupon code for store credits?
Also, you can head over to Coupons > Store Credits and view the customer to double-check that store credits have been used: https://prnt.sc/qpraEZCgQGKL
If there are no regular coupons under the name, try doing a basic debug: How To Conduct A Basic Debug For Advanced Coupons – Advanced Coupons (advancedcouponsplugin.com)
- This reply was modified 1 year, 9 months ago by Jeff Alvarez.
Hi @kalora123
Could you please check if disabling the Caching plugin fixes the issue? If not then it may be due to something else.
If yes, then you’ll likely have to exclude caching for our plugin. You mentioned that you tried to disable caching through the WP-Config file.
Could you please try disabling caching on a page basis or plugin level settings and see if that helps?
As this directly involves a 3rd party plugin our support is quite limited, I suggest you reach out to the W3 Total Cache support forum on how to exclude cache for users or stop caching our plugins.
Let me know if you have other questions.
Hi @jderosa ,
Please give this snippet a shot, to use it simply change or add more $product_types[] or update the custom_product_type1 to the product type your store is using.
add_filter( 'acfw_product_search_allowed_types' , 'acfw_search_add_support_for_custom_products' ); function acfw_search_add_support_for_custom_products( $product_types ) { $product_types[] = 'custom_product_type1'; $product_types[] = 'variable-custom_product_type1'; return $product_types; }
Once your happy with the code, please add the snippet to your child theme’s functions.php or through the WPCode plugin
You can reach out to the other plugin’s support or author to help complete the snippet.
- This reply was modified 1 year, 9 months ago by Jeff Alvarez.
Hi @solutioinc ,
Apologies for the delay in our response.
There’s currently no feature to force the PO field be required or available filters to change that so I’m unable to provide custom snippets.
Having said that, I’ll raise a feature request for this with our development team but please keep in mind that we aren’t able to provide any ETAs when it’ll be developed or made.
In the meantime, let us know if you have other questions.
Cheers,
hi @welaunchio ,
Please give this code a try, it’ll only return the wholesale price of the product.
global $wc_wholesale_prices; $user_wholesale_role = $wc_wholesale_prices->wwp_wholesale_roles->getUserWholesaleRole(); $wholesale_price = WWP_Wholesale_Prices::get_product_wholesale_price_on_shop($product->get_id(), $user_wholesale_role);
If that doesn’t work, then I’m afraid we’ll need to raise an integration request with our developers. We also are not able to assist from here as this is outside our support scope.
Let us know if you have other questions.
Regards,
Hi there,
Apologies for the delay in our response.
As previously mentioned, the likely reason why it’s not working as intended is that our plugin will use the Wholesale price by default when it’s available, it’ll only use retail if there’s no wholesale price.
If you’d like to have the customer have a wholesale role but use retail price as the default, I’m afraid you’ll have to create a snippet to modify how our plugin behaves. For this, we aren’t able to provide support.
You mentioned that the snippet was working for admin/regular/guest customers. Would it be fine to simply have their user roles as regular customers so the price by default is retail and have the function update to wholesale instead of having it default to the wholesale customer?
Alternatively, you could create another role and name it custom-wholesale, which is outside wholesale prices so by default it’ll use retail and have your function update accordingly. Since this is a custom role it’ll be separated from regular customers so the function you have should work.
Let me know if you have other questions.
Regards,
Hi @zewa ,
Good news, we made a custom snippet that achieves just that. Please add the following to your child theme’s functions.php or through the WP Code plugin
add_filter( 'woocommerce_cart_totals_coupon_html', 'woocommerce_cart_totals_coupon_html_filter', 10, 3 ); /** * Function for
woocommerce_cart_totals_coupon_html
filter-hook. * * @param $coupon_html * @param $coupon * @param $discount_amount_html * * @return */ function woocommerce_cart_totals_coupon_html_filter( $coupon_html, $coupon, $discount_amount_html ){ if($coupon->discount_type === "percent"){ return $coupon->amount ."% "."or " . $coupon_html; } return $coupon_html; }Result: Screenshot by Lightshot (prnt.sc)
Please note that we aren’t able to provide further support for custom codes when/if used.