All things Shopify and commerce
Hi guys,
I'm launching a new product this week and have invited people to sign up for early access by submitting their email.
I would like to send them a link to a secret product page where only they can buy the product a day before it goes on general sale.
Can anyone recommend an app or tool to do this? I currently have the product page as a landing page for emails sign ups with 'coming soon' and no inventory added.
Ideally, I wouldn't have to duplicate the product, but if that's the only solution then that's ok as I can monitor inventory myself and make sure the correct amount is added to the product page for the general public when that goes live.
Thanks so much for your help!
You may achieve this through customisation of a product template and assigning the said product to this template a day before and allowing access to customers who have a pre-defined tag say 'preview'
The only condition is that you would need to enable the product sell through logged in customers only, so no guest checkout, which anyway is the plan.
Hi!
So to create an exclusive product, I would use customer tagging then validate it on the product page or cart.
Tag Your Early Access Customers:
Create a validation in the theme code:
For the code, you'll want to attach it to the ATC event specific to your theme. You'll check if the customer has the tag, and if not, you'll remove the item from the cart. You'll have to modify it to your theme, but it'll look like this:
window.customerTags = "{{ customer.tags | json }}";
const requiredTag = "Early Access"; // Replace with actual tag
const productVariantIdToRemove = 1234567890; // Replace with the actual variant ID
// Check if the customer has the required tag
const hasTag = customerTags.includes(requiredTag);
// If the customer doesn't have the tag, remove the product from the cart
if (!hasTag) {
// Fetch the current cart contents
fetch('/cart.js')
.then(response => response.json())
.then(cart => {
const itemToRemove = cart.items.find(item => item.variant_id === productVariantIdToRemove);
// If the product is in the cart, remove it
if (itemToRemove) {
fetch('/cart/change.js', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
id: itemToRemove.key, // Item key to remove
quantity: 0, // Set quantity to 0 to remove the item
}),
})
.then(response => response.json())
.then(cart => {
console.log('Product removed from the cart:', cart);
// Optionally, refresh the cart or display a message
})
.catch(error => {
console.error('Error removing product from cart:', error);
});
}
})
.catch(error => {
console.error('Error fetching cart:', error);
});
}
A couple notes: This only validates on the front-end. You could also just check for the customer tag in liquid code, and render the product page conditionally, but if you have it in any collections, suggested products, ect., customers could still add it from there. You can add to the code it to actually notify the customer they don't have access.
As you mentioned looking for an app, another option without code is Latch on Shopify App Store. You can select the product(s) to lock and limit it to only customers with that tag. You can also upsell a required product or subscription. Fair disclaimer: I am the main developer for Latch.
Let me know if any of that works for you or if I can offer any help!
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024