top of page
davydov consulting logo

Different Price for Different Users in Wix Shop

Different price for different users in Wix Shop

Wix Individual Price Tag Integration | Custom Price for Products on Wix

Velo Code Solution

New opportunities for flexible customization of your Wix online store. Our Velo code solution allows you to create a system of regular or premium customers in your online store who will see the exclusive price for various products. You choose and set up customer groups and discounts yourself.


How did Wix Individual Price Tag Work?


Functionality is built on database where list of products has many columns for price input. This is then connected to Wix pages of your site with Velo. There is also a straightforward system of assigning each registered user to the correct pricing group.


The solution has a huge number of usage scenarios and is applicable to absolutely any online store. With different price options, you can make correct impression on your customers, keeping other customers unaware of prices for other groups.

Tools

Loading...

Background image

Example Code

frontend
backend

import wixData from 'wix-data';


import wixUsers from 'wix-users';


import { session } from 'wix-storage'


let roles = ["HPPL1", "HPPL2", "DVPL1", "DVPL2"];


let currentRole;


let allProducts


$w.onReady(async function () {


 let filter = session.getItem("filter");


 if (wixUsers.currentUser.loggedIn) {


   let userRoles = await wixUsers.currentUser.getRoles()


   currentRole = userRoles.find(ur => roles.some(r => r == ur.name)).name;


 }


 if (currentRole) {


   $w("#eur").expand();


   $w('#' + currentRole.toLowerCase() + "price").expand();


   if (!filter)


     $w("#products").setFilter(wixData.filter().isNotEmpty(currentRole.toLowerCase()));


   else {


     $w("#products").setFilter(wixData.filter().isNotEmpty(currentRole.toLowerCase()).contains("title", filter));


     session.removeItem("filter");


   }


   allProducts = await wixData.query("CustomPrice").isNotEmpty(currentRole.toLowerCase()).ascending(currentRole.toLowerCase()).limit(1000).find();


   $w("#maxPrice").max = allProducts.items[allProducts.items.length - 1][currentRole.toLowerCase()];


   $w('#maxPrice').min = allProducts.items[0][currentRole.toLowerCase()];


   $w("#maxPrice").value = allProducts.items[allProducts.items.length - 1][currentRole.toLowerCase()];


   $w("#addToCart").expand();


   $w('#maxPrice').expand()


   FillDrops()


 } else {


   if (filter) {


     $w("#products").setFilter(wixData.filter().contains("title", filter));


     session.removeItem("filter");


   }


   allProducts = await wixData.query("CustomPrice").limit(1000).find()


   FillDrops()


 }


});


More Velo Integrations

Wix UPS Integration: A Complete Guide for eCommerce Shipping Efficiency

Learn how to integrate UPS with Wix to streamline eCommerce shipping, automate deliveries, and boost customer satisfaction with real-time tracking.

Wix UPS Integration: A Complete Guide for eCommerce Shipping Efficiency

Wix Pipedrive Integration: The Ultimate Guide to Streamline Your Sales Funnel

Connect Wix with Pipedrive effortlessly. Streamline leads, automate workflows, and manage your CRM directly from your Wix website with Davydov Consulting.

Wix Pipedrive Integration: The Ultimate Guide to Streamline Your Sales Funnel

Wix Salesforce Integration: A Comprehensive Guide

Integrate Wix with Salesforce to automate sales, manage leads efficiently, and sync your CRM data seamlessly via Davydov Consulting.

Wix Salesforce Integration: A Comprehensive Guide

CONTACT US

​Thanks for reaching out. Some one will reach out to you shortly.

bottom of page