We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Changing "Default Title" for single variant products (in a shogun element)

Changing "Default Title" for single variant products (in a shogun element)

1ian
Tourist
5 0 1

How can I change "Default Title" For single variant products to say "One Size" for the shogun product variant box shown below in the screenshot

 

shogun default title.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here's some extra info if needed!
"Your current version: Dawn 7.0.1" (also shogun page builder is used, like referenced above)
https://xyled.online/ is the page that has this and is the only page with this dropdown element which I need help with

Shop password is "fortnitelol"

Replies 4 (4)

DaisyVo
Shopify Partner
4469 501 598

Hi @1ian ,

Upon checking, I see that you are using the app "Shogun Page Builder", and the code confirms this as well.

Could you please share a screenshot of what you have entered in the Shogun app? This will help us better understand and assist you further.

Additionally, for the product display:

  • If a product has only one variant, it currently shows "Default Title", we recommend contacting the Shogun support team for further assistance.

Please let me know how we can further assist you.

 

Best,

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

Guleria
Shopify Partner
4299 825 1189

Hello @1ian ,

 

Edit theme.liquid 
search for </body>

Now just before to it  add this code

<script>
document.addEventListener("DOMContentLoaded", function () {
// Select all <select> elements inside elements with the class `shg-product-selector-wrapper`
    const selectors = document.querySelectorAll('.shg-product-variant-select');

    selectors.forEach(select => {
        // Count the number of options in the select element
        const optionCount = select.options.length;

        // If there is more than one option, replace the select element with a <span>
        if (optionCount <= 1) {
            const span = document.createElement('span');
            span.textContent = "One size";

            // Replace the select element with the <span>
            select.parentNode.replaceChild(span, select);
        }
    });
});	
</script>

 

Regards
Guleria

 

 

- Elevate Your Store with Expert Shopify Services. Email: guleriathakur43@gmail.com - Need a quick fix or a tailored customization? I’ve got you covered.
- Looking to enhance your pages? Try GEMPAGES- a powerful drag & drop page builder.
- Let’s make your store stand out. Get in touch today!
- My Apps: Productify Groups – Smart product grouping made easy.
1ian
Tourist
5 0 1

Hey, thanks for the code! but unfortunately it didn't seem to change the text

 

I also tried putting it in theme.shogun.landing.liquid just to see but that didn't do it either

1ian_0-1735207893730.png

 

Guleria
Shopify Partner
4299 825 1189

I can't find the code in the source code.  

Use code in the theme file which is actively used in the theme. 

- Elevate Your Store with Expert Shopify Services. Email: guleriathakur43@gmail.com - Need a quick fix or a tailored customization? I’ve got you covered.
- Looking to enhance your pages? Try GEMPAGES- a powerful drag & drop page builder.
- Let’s make your store stand out. Get in touch today!
- My Apps: Productify Groups – Smart product grouping made easy.