Customized colors, image banner based on user tag

Customized colors, image banner based on user tag

Userino1999
New Member
7 0 0

Hi everyone,

 

Does anyone know if there is an app that can change the below based on a user tag?

- Image banner (display a different image based on user tags)

- Color schemes (display different color schemes based on user tags)

- Sale icon (display a different sale icon based on user tags)

 

So I'm thinking there would be a default version of the store with all of the above and then when a user logs in, the above could change to something more personalized based on their tag.

 

Thanks!

Replies 3 (3)

Dan-From-Ryviu
Shopify Partner
8532 1682 1692

It does not have an app, but you may hire an expert, and then they will add customized code to do your request.

- Helpful? Like and Accept solution to let me know or Buy me Coffee ❤️!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.

Userino1999
New Member
7 0 0

Thanks Dan.

 

I'm attempting to customize the code myself. Which file would you insert the below code into? I've tried theme.liquid and theme-editor.js

 

The code just checks for a userTag and changes the color and displays a greeting. I've tried simpler versions as well, but I can't seem to get even the most basic ones to display/change anything.

 

{% if customer %}
{% assign userTag = customer.tags | split: ', ' | first %}
<script>
if ("{{ userTag }}" !== "") {
<style>
body {
background-color: #00FF00;
}
</style>
alert('Hi {{ userTag }}');
} else {
// Display a default message if userTag is not defined
alert('Hi there!');
}
</script>
{% endif %}

 

Dan-From-Ryviu
Shopify Partner
8532 1682 1692

Please try to update code to this and check

{% if customer %}
{% assign userTag = customer.tags | split: ', ' | first %}
{% if ("{{ userTag }}" !== "") %}
<style>
body {
background-color: #00FF00;
}
</style>
<span>Hi {{ userTag }}</span>
{% else %}
// Display a default message if userTag is not defined
<span>Hi there!</span>
{% endif %}
{% endif %}

- Helpful? Like and Accept solution to let me know or Buy me Coffee ❤️!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.