fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

we want to buy your pro swatches plugin.
We have a question:
We want to create a page with new products, we want to be able to show there, for example, a new color of a variation as a novelty.
Is there an option to add the ‘new’ option in the variation field, that e.g. red is new and is displayed on the ‘news’ page with the new variation selected? (i.e. there will be all color variations under the product photo, but so that the product photo is from this new variation and the new color is also marked) is there an option to get it? in php? in the loop? in wp panel? 🙂

Hakik Zaman

Hi Rafał,

Unfortunately, the feature is not currently available..

​But it’s great idea. I’ve added it as feature request. I’ll discuss this feature with my team and make it available with the coming version.

In the mean time, please send the feature request here: https://storepress.fider.io/
and ask your other to upvote it.

Cheers!

I have one more question, with the PRO version where swatches also works on the store / archive website, can I somehow display products from swatches elsewhere? e.g. 10 products with swatches on the home page?

Now if I loop through products, the swatches don’t puff, the products are displayed but without the swatches option. How can I do this? what do i need to add to the loop in php to make it work?

Hakik Zaman

Hello Rafał Olejarz,

Thanks for your interest. Please use the below hook inside the loop-

<?php do_action('wvs_pro_variation_show_archive_variation'); ?>

By the way, make sure your Swatch PRO is installed and activated.

Thanks

ok it works! however, the pictures do not change to those added in variations.
The code we use in the loop to show the photo is:

<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $loop->post->ID ), ‘single-post-thumbnail’ );?>

<img src=”<?php echo $image[0]; ?>” data-id=”<?php echo $loop->post->ID; ?>”>

 

Do we have to add some class here or take it some other way to make it work?

Hakik Zaman

Hi Rafał,

Could you please explain a bit more? I am sorry that I could not get your query.

You can record me reproducing your issue using tool like this? https://www.useloom.com
It helps me to quickly figure out the issue.

Thank you

We have a loop where we display products (this is not the standard archive.php).
We take products and loop to put your code to show swatches and it works.
However, when I click on a given color in swatches, the product photo does not change.

This is what our product loop looks like:
<?php while ( have_posts() ) : the_post();?>
<div class=”product”>
<a href=”<?php echo get_permalink();?>”>
<?php global $product; ?>

<img src=”<?php echo get_the_post_thumbnail_url($loop->post->ID); ?>” class=”img-responsive” alt=””/>

<p>
<?php $Typesterms = get_the_terms( $post->ID, ‘types’ ); if( $Typesterms ):?>
<?php foreach( $Typesterms as $Typesterm ): ?>
<?php echo esc_html( $Typesterm->name ); ?> <?php endforeach; ?> <?php endif; ?>
</p>

<?php do_action(‘wvs_pro_variation_show_archive_variation’); ?>
</a>
</div>
<?php endwhile; wp_reset_postdata(); ?>

 

As you can see your code is at the bottom and it works, but the picture inserted above does not change after clicking on the swatches from your code.

I hope it will explain a lot to you without recording the movie 🙂

 

Hakik Zaman

Hello Rafał,

Sorry for the inconvenience. Sometimes screencast help us a lot instead of reading a multiline paragraph. Because, we are giving support to multiple site at a same time 🙁. I hope you will understand our situation.

By the way, please add your product wrapper class here and image selector here. From your code your wrapper class is .product and image selector is .img-responsive

If it not works =>

Can you please give us a temporary admin access to your site? We’ll try to investigate the issue for you.

You can add new users by going to Users > Add New set the user and password for us, set the role to admin and set the info here.

And add your site URL, login username, and password in the site login area. Follow this guideline: https://www.useloom.com/share/27c1f2ac633c4060b2da883d946107d7

Hope to hear from you soon!

Thanks

it works! we are the fastest and the best support I have met! thanks! 😉

Hakik Zaman

Hello Rafał Olejarz,

Thanks for your complement.

If you found my support helpful, my humble request to you to provide your beautiful thought here. It will make us inspired.

By the way, stay safe and take care of your family. Hopefully, Covid-19 outbreak will end up soon.

Thanks

hello my favorite support!

I found an option to show url for a given variation in the plugin options, but it happens after selecting it on the product card.
Is there an option on the store’s website, after the selected color variation, your swatches link immediately directs you to the selected variation on the product card ??

 

Hakik Zaman

Hello Rafał Olejarz,

Sorry for my delay, we were on our Weekend Leave since Thursday.

You have created another ticket on this. Can we discuss further more on this there?

So, I am closing this ticket.

Thanks