Want to remove specific word from product description total 50k product

Solved

Want to remove specific word from product description total 50k product

HXtech001
Tourist
10 0 1

I have a tech store and I want to change price for my all products by 30% but I have also mentioned price of every product in description tab now I want to remove word price and what next to it like xyz amount from my whole store I have 5 collections and 50k products.

 

Sample attached (want to remove price which is marked with red line from all product description) 

Screenshot 2024-09-20 200554.png

 

 
 

Accepted Solution (1)
pawankumar
Shopify Partner
618 91 111

This is an accepted solution.

Hi @HXtech001 
Please put this code in theme.liquid before body closing tag </body>

<script>
document.addEventListener("DOMContentLoaded", (event) => {
  var tags = document.querySelector('#product_all').innerHTML.split("<br>");
  var newTags = [];

  tags.forEach(tag => {
    if(!tag.includes("Price")) {

        newTags.push(tag);
    }
});

document.querySelector('#product_all').innerHTML = newTags.join("<br>");
});
</script>


If I managed to help you then, don't forget to Like it and Mark it as Solution!

Thanks!



- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: [email protected]
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan

View solution in original post

Replies 12 (12)

Tech_Coding
Shopify Partner
326 87 78

Hello @HXtech001 
would you like to share your store URL and password if any please.
so i can check and provide you possible solution for your question.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.
HXtech001
Tourist
10 0 1
Tech_Coding
Shopify Partner
326 87 78

you have to remove price from your liquid file

Tech_Coding_0-1726846390972.png

from CSS its difficult to remove the price

 

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.
HXtech001
Tourist
10 0 1

how I can do that?

pawankumar
Shopify Partner
618 91 111

Hi @HXtech001 
If it is in product description then you can remove it by exporting the products on local then change it, after change, re-import the products

Please don't forget to Like and Mark Solution if this helped you.

Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: [email protected]
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
HXtech001
Tourist
10 0 1

I have like 50k + products it's really hard for me to re-upload

pawankumar
Shopify Partner
618 91 111

There is bulk editor in-built in shopify backend as well, you can use that by working on a set of products first and then others, it works same like excel

That may be helpful to you
You can select the products and click bulk edit to do that

Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: [email protected]
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
HXtech001
Tourist
10 0 1

still I have to select and remove text for each product 

pawankumar
Shopify Partner
618 91 111

Can you share the product url where it is showing so that i can check if there is automatic way through JS to remove it ?
Please share the password as well if it is password protected

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: [email protected]
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
pawankumar
Shopify Partner
618 91 111

This is an accepted solution.

Hi @HXtech001 
Please put this code in theme.liquid before body closing tag </body>

<script>
document.addEventListener("DOMContentLoaded", (event) => {
  var tags = document.querySelector('#product_all').innerHTML.split("<br>");
  var newTags = [];

  tags.forEach(tag => {
    if(!tag.includes("Price")) {

        newTags.push(tag);
    }
});

document.querySelector('#product_all').innerHTML = newTags.join("<br>");
});
</script>


If I managed to help you then, don't forget to Like it and Mark it as Solution!

Thanks!



- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: [email protected]
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
HXtech001
Tourist
10 0 1

you are real gem 😍 God will bless you