Product Price manipulation on add to cart

Topic summary

A developer is seeking to implement dynamic product pricing based on custom metafields. The requirement involves applying percentage-based discounts when logged-in users add products to their cart.

Specific Use Cases:

  • Product A with a 20% metafield value should have its price reduced by 20% upon cart addition
  • Product B with a 15% metafield value should similarly receive a 15% discount

Technical Context:

  • The developer is capable of theme development and working with Shopify Functions/Ajax APIs
  • They’re looking for solutions beyond Shopify Scripts
  • The text appears partially corrupted/reversed in the original post

Current Status:

  • Another user questioned whether existing Shopify discount features could accomplish this goal
  • An image was shared (likely showing discount configuration options)
  • The discussion remains open with no definitive solution provided yet
Summarized with AI on November 14. AI used: claude-sonnet-4-5-20250929.

Hello Team,
Please help me to reaching out the solution how can i achieve a functionality like i have a product meta set in backend which contain % value of discount i need to add when a logged in user try to add a this product on cart but just like suppose

  1. Product A have meta value 20% then its price should reduce to 20% when it being added to cart.
  2. When in same cart product B added which contain 15% set then its price should reduce to 15%.

How can i achieve this I am a developer and also can able to create any kind of theme development and Shopify Functions Ajax API
So i can apply any kind of solution which please help to reaching out this functionality.
Please except shopify script.

Exisiting discounts aren’t enough to achieve this?