I have added a personalization text box by using coding on a product, but the box is showing up on all products. How do I make this for just 1 product?
You can check for specific collection, type or category and then show text box only for those products.
Hey there @Melmiz843
This is Alexis from Akohub’s Marketing team!
To make your personalization text box appear on only one specific product in Shopify, you’ll need to adjust the code to target that product specifically. Here’s a quick guide:
-
Identify the Product ID:
- Go to the product page in Shopify’s admin.
- Look at the URL – it will have a number like …/products/your-product-name?id=1234567890. That number is your product’s unique Product ID.
-
Edit the Code:
- In Online Store > Themes, click Actions > Edit Code.
- Open the file where you added the code for the personalization box. This is usually in the product-template.liquid file or within a product-related section.
-
Wrap the Code in a Conditional Statement:
- Use an if statement to check for the specific Product ID, so the box only appears on that product.
Here’s an example of how your code might look:
{% if product.id == 1234567890 %}
{% endif %}Replace 1234567890 with your actual Product ID.
This way, the text box will only appear on the product with the specified Product ID. Let me know if you need more help! ![]()
You can use the Easify Product Options app (free plan available) to create a text field and assign it to specific products. This setup requires no coding and can be completed in just a few minutes
.
