Home › Forums › Pro Support › How to display woocommerce featured category in carousel
- This topic has 3 replies, 4 voices, and was last updated 2 years, 7 months ago by
elvin.
-
AuthorPosts
-
August 31, 2020 at 8:26 am #18795
famobaby
ParticipantHI,
Please, I would like you to show me how I can use this amazing plugin to display woocommerce featured product category and best selling. I want the display to have 4 columns on laptop and 2 columns on mobileAugust 31, 2020 at 8:16 pm #18810Tom
KeymasterHi there,
As of right now, the plugin isn’t fully integrated with WooCommerce. Things like the add to cart button and prices won’t show up automatically.
It’s something we’d like to do – it will likely find it’s way into the block-based version we’re working on 🙂
February 9, 2021 at 3:55 am #26503Elisabeth
ParticipantHi there,
Thanks for the great plugin.
I have a related problem/question to the one above hence sticking it on here rather than in a fresh topic/thread..
I am trying to create a page with a restaurant menu on it. I’d like to pull the following content: dish title, short description, price and ‘add to cart’ button. I can’t seem to find a way to do it – is that because this integration with WPSP and Woo is still in development?
Ideally, I’d also like to make it so the title of the dish isn’t a clickable link as there isn’t really any relevant ‘read more’ information (it’s all in the short description). Customers will have to adjust quantities in the cart I think.
My hope is to find a solution that is simpler than using something like Beaver Themer which is my other likely avenue of enquiry.
Can you suggest a work around?
Thank you
ElisabethFebruary 9, 2021 at 11:59 pm #26537elvin
ModeratorHi there,
Assuming the query is correct (WPSP post display is set to product), we should be able to display all the other information from the product.
Here’s an example PHP snippet:
add_action('wpsp_after_content', function(){ if(function_exists('woocommerce_template_loop_add_to_cart')){ $product = wc_get_product( get_the_ID() ); woocommerce_template_loop_add_to_cart(); echo '</br>'; echo 'Regular Price: '.$product->get_regular_price().'</br>'; echo 'Sale Price: '.$product->get_sale_price().'</br>'; echo 'Current Price: '.$product->get_price().'</br>'; echo 'Description: '.$product->get_description().'</br>'; echo 'Short Description: '.$product->get_short_description().'</br>'; } });
This snippet displays the regular, sale, current, description and short description of the product if it exists on the WPSP list.
Here’s an unstyled demo: Demo.
This is just to show the potential. It’s up to you as the site builder on how make it look better. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.