Home Forums WoodMart support forum product_variation post type

product_variation post type

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #152783

    tvojsplet
    Participant

    Hi, 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.

    #152808

    Artem Temos
    Keymaster

    Hi,

    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

    #152854

    tvojsplet
    Participant

    Than 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.

    #152856

    Artem Temos
    Keymaster

    Because 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.

    #152861

    tvojsplet
    Participant

    You’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?

    #152892

    Artem Temos
    Keymaster

    What 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.

    #152915

    tvojsplet
    Participant

    I 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.
    #152932

    Artem Temos
    Keymaster

    Sorry, 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/

    #152939

    tvojsplet
    Participant

    I 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.

    #153153

    tvojsplet
    Participant

    Hi, 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.

    #153175

    Artem Temos
    Keymaster

    You can find the code for compare and wishlist modules there as well. Sorry, but we don’t know what exactly should be modified.

    #153176

    tvojsplet
    Participant

    I 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.

    #153177

    Artem Temos
    Keymaster

    Compare and wishlist work differently and there are no such places in the code as in the quick view.

Viewing 13 posts - 1 through 13 (of 13 total)