Hide product in shop but allow purchases via Velo

Question:
How would I go about allowing customers to purchase a product that’s hidden from shop?

Product:
Wix Editor, Velo

What are you trying to achieve:
I have several furniture items in my shop that require assembly and would like to introduce an installation service for these items. I have created an “Installation Service” product and want to hide it from my store because I do not want customers to be able to directly purchase this “Service”.

As the calculations for the installation service charge can be quite complex, I do not want to introduce this as a variant for installable products, especially since some of the products already have 2 variant options and subsequent variant options would make maintainability of the variant prices extremely cumbersome.

Thus, my strategy is to introduce a calculator of sorts for customers to input certain information to calculate the charge (for example, the number of flights of stairs to reach their house need to be input as they factor into the charge). An accompanying button would create the request to add the “Installation Service” to cart.

However, this does not seem to work unless my “Installation Service” is not hidden.

What have you already tried:
I have attempted using the wix-stores-frontend > Cart > addProducts() and the new wix-ecom-backend > CurrentCart > addToCurrentCart() (after converting to webMethod to use in front end). Neither of these works unless I unhide my product.

Hey Justinn,

Instead of having the ‘Installation Service’ as a product, you can use the Wix Ecommerce Additional Fees SPI with which you can perform complex calculations on the items added to the cart, and you can change you Installation Service charge based upon this. This will not be a product, but will be included as an additional fee which will get added to the total price during checkout.

Hey Pratham, thanks for the suggestion! Spent the last few days digging into the Additional Fees SPI and found that it can almost dynamically calculate fees based on cart items and user preferences.

I’ve manage to set it up so that customers can specify how many flight of stairs it takes to reach their home from the carpark and calculate additional fees per bulky item, for simplicity’s sake, its $1 per flight of stairs.

However, the SPI has the unfortunate issue where it only calls calculateAdditionalFees when cart is updated and apparently caches the calculation per cart. For example, if I have 2 bulky items and the customer specified 1 flight of stairs, the SPI is called when cart page is accessed and calculates a fee of $2 (2 items * $1 * 1 stairs). But if the customer changes to 2 flights of stairs, SPI is not called and the fee is not updated to $4 (2 items * $1 * 2 stairs) and is not updated until the cart is updated. If I add a 3rd bulky item, SPI is called and the fee is properly updated to $6 (3 items * $1 * 2 stairs). Yet if I remove the recently added item (back to the original 2 items in the cart), the SPI is not called again and it just uses the $2 fee that it originally calculated.

The only positive point is that SPI appears to be called whenever checkout page is accessed, so at the very least the risk of charging customers wrongly appears to be low.

TL:DR calculateAdditionalFee only seems to be called in response to certain backend events, is there any way to extend the event listeners or call calculateAdditionalFee manually?

Hey Justin,

Hmm that’s funny…
How are you letting the customer choose the flight of stairs? Have you added that as a product too?

Yes and I don’t think users have an option to add / remove line items from the checkout page. If they need to do so, they will have to go back to the cart page by clicking on the Edit Cart button. And as long as the SPI is working correctly on the checkout page, you’re good to go (:

But if you’re sure that it’s being caued by a bug and not your code logic, then it would be worth reporting it to the Wix team here: Report a bug

Thanks Pratham! Will check up with Wix and see what they could advise. I believe calculateAdditionalFees caches the calculation for each basket to prevent excessive calls to the SPI but its just really weird why they wouldn’t just recalculate onOrderUpdated instead of searching up the calculations for a similar order.

1 Like