I am not really deep into coding, but wanted to implement your code snippet for the back-in-stock-button in our prestige theme. I changed the wordings to german and did some modal changes.
Option 1: Not sure if the problem is the highlighted “product_page_class”, which seems to be different in every theme and I did not chose the right wording for the prestige theme?! May be you guys can have a look at the code below? Your help is much appreciated!
Option 2: May be I used the wrong spot in the theme.liquid?! See picture below
Many thanks in advance,
That’s how the code looks right now, but the button unfortunately doesn’t show up:
var klaviyo = klaviyo || ;
product_page_text: 'e-mail erhalten, sobald verfügbar',
product_page_class: 'button button—primary button--full',
headline: 'e-mail erhalten, sobald das produkt wieder verfügbar ist.',
newsletter_subscribe_label: "ich möchte auch den newsletter abonnieren."
button_label: 'e-mail sobald wieder verfügbar',
subscription_success_label: 'hat geklappt, du bist drin! wir melden uns, sobald das produkt wieder im store ist.',
additional_styles: "@import url('https://fonts.googleapis.com/css?family=Helvetica+Neue');",
font_family: '"Helvetica Neue", Helvetica, Arial, sans-serif;',
The spot where I put the code snippet in:
Best answer by Dov
Thank you for sharing your question with the Klaviyo Community.
Indeed, Back in Stock can be tricky! For starters, yes, that is the correct theme.liquid file.
Also, the “product_page_class” simply determines the appearance of the button/link on the page it will not impact the ability of the button to display. If you want to change the appearance of the button, you can try changing the current value from ‘button button—primary button--full’ to ‘button’ or using the class of your “Add to Cart” button. You can find the class of the button by inspecting the button in Google Chrome.
Finally, we currently do not support troubleshooting paid Shopify themes for Back In Stock. You can find the list of themes we support here. With that said, I strongly recommend reviewing the reply to a previous post troubleshooting some common issues for Back in Stock. You will find that below:
Thanks and have a wonderful day.