Jump to content

Remove "from" in product price with multiple variants

Go to solution Solved by SourceProjects,

Recommended Posts

Posted (edited)

Does anyone know if it is possible to remove "From" in product prices when you have a few variants with higher prices? I would only like the lowest price to display without "from" and am struggling to find a solution.

Any help would be much appreciated!Thanks

Edited by 11squared
Initial Revision
Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
Posted

Sure!

Here is a link to one.

Basically the only reason variants were added was for customers to add personalisation to products and pay the price accordingly (£7 per initial for products below £200) so the price may go up slightly if they choose to do this but the product price itself is always the same so it gives the wrong impression to say "from"...

Would be so grateful if you could shed any light. Thought this would be a simple fix! : )

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
Posted (edited)

@11squared With that site url. You can add to Home > Design > Custom CSS


/* Hide from & Price */
.product-price {
   visibility: hidden;
}
/* Unhide price */
span.sqs-money-native {
   visibility: visible;
   display: block;
}


Edited by tuanphan
Initial Revision

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Thank you so much! That has helped and there are no more froms on the product pages... The only concern is that now when you are selecting the variant within the product page, the price disappears... Do you know how I'd go about that?

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
Posted

@tuanphan Thank you! : ) I have removed that css now.

I did originally try this code in the header:


<script>
   $(document).ready(function() {
   var text = $('.ProductItem-details .product-price').text();
   text = text.remove ('from');
   $('.ProductItem-details .product-price').text(text);
 });
 </script>

which was posted by @Patcross10 on a related issue (https://answers.squarespace.com/questions/122346/how-do-i-change-product-price-displayed-that-has-m.html) but it didn't work unfortunately...

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
Posted

@11squared Use this code


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
    $(document).ready(function() {
    var text = $('.ProductItem-details .product-price').text();
    text = text.remove ('from');
    $('.ProductItem-details .product-price').text(text);
  });
  </script>


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Thank you! I just tried it in the site header and then in a product page header but it didn't manage to remove the from... It's very stubborn!

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
Posted

@tuanphan I tried thanks but it didn't work either...

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
Posted

@tuanphan Thank you so much, that's so kind of you!

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
Posted

@tuanphan Thank you! Just tried but unfortunately this isn't working either.

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
  • 2 weeks later...
  • Solution
Posted

Hi, I found a solution for this, just wanted to share!

In CSS, add:


.summary-price {
    visibility: hidden;
}
/* Unhide price */
span.sqs-money-native {
    visibility: visible;
    display: block;
}

Then in Advanced >> Code Injection add this to the Footer:


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
     $(document).ready(function() {
     var text = $('.ProductItem-details .product-price').text();
     text = text.replace ('from', '');
     $('.ProductItem-details .product-price').text(text);
   });
   </script>

Thank you @Tuanphan for all your help! : ) I would not have found these solutions otherwise.

Elizabeth Gaffney
Source Projects
 
Branding Design, Business Support and Web Development
✉️ hello@sourceprojects.co
🖥️ www.sourceprojects.co
  • 5 months later...
Posted

I have tried to implement the selected solution (Aug 5) at the top of the thread. I am using a premium e-commerce account with the template Sonora. 

My site is in Italian language so the product price doesn't say "from" but it says "da".  I modified this detail in the code, however, it didn't work for me. Nothing changed except a return was inserted after the "da" pushing the price to a new line.

My real issue is that on the page in the preview summary of the product, I would like to force it to display the price of only one particular variant - a variant that is not the lowest in price, but that is usually the best seller.  Does anyone have a workaround for this?

Thanks in advance 😉

  • 3 weeks later...
Posted

@sportsam05 Did you figure this out? I'm trying to solve the same problem (display the price of a specific variant which is not the lowest in price). For now have just removed the price display altogether, and added the price in each variant's name so that it displays in the drop-down list... 

  • 2 weeks later...
Posted
On 2/9/2020 at 3:34 AM, jcsteigs said:

@sportsam05 Did you figure this out? I'm trying to solve the same problem (display the price of a specific variant which is not the lowest in price). For now have just removed the price display altogether, and added the price in each variant's name so that it displays in the drop-down list... 

No, I haven't figured it out. Your workaround sounds good, but it won't work for my client.  I was thinking of putting in a question directly to tuanphan but in the end it stopped being a priority. However, it's good to note that multiple people are looking for this functionality.

  • 4 months later...
  • 10 months later...
  • 8 months later...
Posted
On 5/22/2021 at 8:03 AM, Danielle_99 said:

Hello! Thank you @tuanphan for all your help with this issue. Using the CSS, my dollar sign has disappeared. Is there anyway to get this back?

Same here

  • 1 year later...
Posted
On 8/5/2019 at 3:58 PM, SourceProjects said:

Hi, I found a solution for this, just wanted to share!

In CSS, add:

 
.summary-price {
    visibility: hidden;
}
/* Unhide price */
span.sqs-money-native {
    visibility: visible;
    display: block;
}

 

 

Then in Advanced >> Code Injection add this to the Footer:

 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
     $(document).ready(function() {
     var text = $('.ProductItem-details .product-price').text();
     text = text.replace ('from', '');
     $('.ProductItem-details .product-price').text(text);
   });
   </script>

 

 

Thank you @Tuanphan for all your help! : ) I would not have found these solutions otherwise.

Hello, i tried using the above after reading this page. I'm trying to hide the "From £X" from all products but show the final price when variants are selected. Any help would be much appreciated.  

Posted
3 hours ago, anastasiosmoiras said:

i tried using the above after reading this page.

The technique above does not work because SS made changes since then.

Please see the following.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.