Home › Forums › WoodMart support forum › product_variation post type
product_variation post type
- This topic has 12 replies, 2 voices, and was last updated 5 years, 1 month ago by Artem Temos.
-
AuthorPosts
-
October 28, 2019 at 7:17 am #152783
tvojspletParticipantHi, how can we activate quick view, wishlist and compare for product_variation post type. Add to cart works for product_variation but tohers don’t.
October 28, 2019 at 9:33 am #152808
Artem TemosKeymasterHi,
Sorry, but there is no such option in our theme and WooCommerce by default. It may require additional code customization or extra plugin but we don’t have an instruction for this. It is out of our theme support scope.
Regards
October 28, 2019 at 10:10 am #152854
tvojspletParticipantThan why add to cart works? This buttons are usles if they don’t work. It shows that product is added to compare or wish list but actuayl is not working.
October 28, 2019 at 10:11 am #152856
Artem TemosKeymasterBecause it is how the WooCommerce works. Variation can be added to the cart as a whole product with particular parameters. But wishlist and compare work only with parent products.
October 28, 2019 at 10:16 am #152861
tvojspletParticipantYou’we also said that discount shown as percentage can’t be done for variation but i have make it work. Can you at least point me to file where i can enable product_variation post type?
October 28, 2019 at 12:49 pm #152892
Artem TemosKeymasterWhat exactly do you mean by enabling product_variation post type? This post type is a part of the WooCommerce plugin and we don’t have an instruction on how to enable it. Actually, it is enabled by default.
October 28, 2019 at 1:32 pm #152915
tvojspletParticipantI use plugin vhery single variation is shown on shop page. Firs i wrote plugin author support request and thy told me that product_variation post type is not enabled in your theme. Link to plugin: https://iconicwp.com/products/woocommerce-show-single-variations/
I had the same problem with sale price. In variation it didn’t show percentage only label so i edit your code and now it show percentage discount also.
My proble m now is that compare, quick view and wishlist icons on shop page don’t work for product variation. For simple product it works. If i click on quick icon for variable product i get only black overlay. If i click on wishlist or compare it give me check icon but it doesn’t put it into compare or wishlist. See attached images. image1.jpg show shop page with simple and variable product. image2.jpg show product from image1 (1,2,3) with variations.
You can check this here: https://www.freeon.si/kategorija-izdelka/previjanje-in-nega/
Attachments:
You must be logged in to view attached files.October 28, 2019 at 1:57 pm #152932
Artem TemosKeymasterSorry, but we didn’t integrate our theme with this plugin and don’t declare that it is compatible with our theme features. You can find the code for all these functions in the folder
inc/integrations/woocommerce/modules/
October 28, 2019 at 2:05 pm #152939
tvojspletParticipantI know you didn’t. Plugin author told me to ask you to enable that post type. I will look into this folder and see if i can maket it work.
October 29, 2019 at 11:54 am #153153
tvojspletParticipantHi, i need a little more help. I have managed to make qucik view work. In template file inc/integrations/woocommerce/modules/ quick-shop.php i change code on line 22 from
$args = array( ‘post__in’ => array($id), ‘post_type’ => ‘product’);
to
$args = array( ‘post__in’ => array($id), ‘post_type’ => ‘product’, ‘post_type’ => ‘product_variable’ );and it works.
I just added post_type => ‘product_variable’. But i can’t find that on wishlist and compare. Can you please point me to file.October 29, 2019 at 1:12 pm #153175
Artem TemosKeymasterYou can find the code for compare and wishlist modules there as well. Sorry, but we don’t know what exactly should be modified.
October 29, 2019 at 1:16 pm #153176
tvojspletParticipantI just need to add post_type => ‘product_variable’. I nedd to find code for compare and wishlist where it get id for post_type product, so i can add also post type product_variable.
October 30, 2019 at 1:17 pm #153177
Artem TemosKeymasterCompare and wishlist work differently and there are no such places in the code as in the quick view.
-
AuthorPosts
Tagged: product_variation
- You must be logged in to create new topics. Login / Register