Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
elizabethgaffney

Remove "from" in product price with multiple variants

Question

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

Share this post


Link to post

20 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
  • 0

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! : )

Share this post


Link to post
  • 0

@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

Send me a message if you have any questions (free 10 minutes).

Don't send to forum message. I will check all questions via the link above

Share this post


Link to post
  • 0

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?

Share this post


Link to post
  • 0

@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...

Share this post


Link to post
  • 0

@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>



Send me a message if you have any questions (free 10 minutes).

Don't send to forum message. I will check all questions via the link above

Share this post


Link to post
  • 0

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 😉

Share this post


Link to post
  • 0

@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... 

Share this post


Link to post
  • 0
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.

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...