Retrieving currently selected product from products dataset

In order to comply with UK law in relation to price marking, i ended up having to make a store page from scratch using the Velo toolkit so that i could put the words “+ VAT” after the price. During testing this worked perfectly and i’m not pretty happy with the results and was ready to move on!

However, it never actually updates which product is displayed. It will always show the same product no matter what.

The way its working currently is that it uses “$w(‘ProductsDataset’).getCurrentItems()” to get which item is currently being viewed, but this always returns the same product no matter the circumstance.

The ‘ProductsDataset’ is directly linked to the Products Dataset automatically generated by wix stores. There is actually a hidden normal products page underneath my custom products page as i am editing the actual product webpage, since every product i sell needs that “+ VAT” tag so i don’t get a huge fine in the mail and so people can actually understand what price they’re paying.

Everything is linked directly to that product dataset, with the galleries and text boxes all getting their info based off that dataset.

So the question is, why does that dataset always show the same product? The rest of the site is still using the standard galleries as i need the filtering options they offer. Will i have to remake the product galleries as well so that this product page will work, or is there just some extra piece of code i need to add to sync the custom product page with the standard wix store galleries?


Did you check with Wix Customer Care for possible solutions to your problem?

The article Wix Stores: Including Tax in the Product Price might provide the information you need.

If the above suggestions don’t provide an answer to your problem, please post the URL of your site and explain how to simply reproduce the problem.

Hi there! I have already looked through that article, and i have faffed around with the settings quite a lot but as they are made for a US audience they miss a key point over here in the UK and i think you have missed the point of my question.

That function itself works perfectly fine, but if you do not display VAT within your listing page itself, you can be fined for breach of UK pricing law. My website is made to sell directly to business, so i need to sell with my prices excluding VAT, but i also need it to be clear that pricing excludes VAT.

The issue i’m mainly having here is that i have made a custom product page, using Velo but the product displayed doesn’t update no matter which product in the standard wix store galleries you select, it will always show the same one.

My site isn’t live yet as it’s still very much under construction and i’m still in the process of finalising my suppliers. I can see if i can make a secondary duplicate site as a demo, but i don’t know how useful that will be since it won’t be on a premium subscription, so i don’t know if the wix stores will work?

If its easier to answer, from a coding perspective how do wix product pages (the built in ones) handle product requests? as in, when you click between an item in a product gallery and go to the normal product page how does the product page know which product to display?

If i could find that out i should be able to modify my current code to work alongside the normal wix stores apps. :slight_smile:

I’m wish i could give you more info here but one of my friends is editing the site at the moment and, like i said, its nowhere near ready to go live yet unfortunately!

@jamieraysouthport Have you made any changes recently? Or is it the same code that “used to work”? If so, please post the URL of your site so we can evaluate.

I did some checking and the feature you want is in the works, but I have no ETA.

As far as your code, let me know if you are still encountering issues with this and I can check it out.