How to Use customVariant Method to Change Product Price Without Shopify Plus

I’m trying to change the product price dynamically using the cart transform function, but as many of you know, Shopify’s cartTransform API only works for Plus stores.

Recently, I came across a public Shopify app that updates the product price even on Shopify Basic plans. After researching, I found that it might be using the customVariant method to achieve this behavior.

However, I’m having trouble understanding how this works and how to implement it.

:red_question_mark: My Questions:

  • How exactly does the customVariant method work?
  • Can it really be used to dynamically change the product price on the cart page or during the add-to-cart process?
  • Is there any sample code, official documentation, or tutorial available to implement this?

App Link: Measura: Sell by Weight & More - Sell by Weight, Length, Area & Volume with POS Integration | Shopify App Store

Thanks in advance!

Could you describe what you mean by the customVariant method? Cart transforms CAN be used for all Shopify plans. Specifically, the update cartTransform operation can only be used by Shopify Plus stores, either via public or custom apps.

Thanks for the clarification, @bkspace!

Let me explain my use case more clearly:

I’m adding a product to the cart with a line_item property called "insurance" (e.g. "insurance": "yes"). My goal is to add $10 to the product’s price only if this property is present.

I initially tried doing this using the cartTransform.update method, and it works, but only on Shopify Plus plans.

Now, I’m trying to achieve the same functionality on a Shopify Basic plan.

I came across this public app:
Measura: Sell by Weight & More
(https://apps.shopify.com/sell-by-weight)

From what I observed, they seem to be changing the product price dynamically even on Basic plans, possibly based on custom properties like weight/area/etc. I assume they might be:

  • Duplicating variants with different prices in advance
  • Using line item properties + front-end logic to show adjusted prices
  • Hiding actual variant pricing and showing “virtual pricing” in cart UI

Is this how it works in such cases?
Can a similar behavior be achieved without Shopify Functions — like simulating a price change by manipulating the line item display in the cart, even if the actual checkout price remains fixed?

I’d appreciate any guidance, best practices, or clarification on whether this price manipulation is just cosmetic (UI-based) or reflected in checkout totals somehow on Basic plans.

Thanks!

My thinking is that the correct way to achieve this in a non-plus store, is to use a discount function instead. So the price starts at the highest possible price, and the discount will bring the value down based on if a product appears with that property or not.

To the best of my knowledge, there isn’t a “better” way to do this natively. Yes, you could absolutely add additional products/variants, use storefront Javascript to manipulate prices, and even use the draft order API to enforce those prices.

All of those approaches have really big drawbacks/trade offs, so I wouldn’t recommend them in practice. Hope that helps!

I have one more condition regarding pricing logic at checkout. There are three payment methods available:

  • If the customer selects Credit Card, the product price should increase by 4%.
  • If they choose Cash on Delivery (COD), the price should increase by 2%.
  • If they select Bank Deposit, the product should remain at the regular price with no increase.

I want to understand how this app is handling the pricing logic. Once that’s clarified, everything else will become clear and easier to proceed with.

This app handles product pricing using line item properties. The following properties are required:

  1. _measura_type: "length"
  2. _measura_item_id: A unique numeric ID (any number is fine, as long as it’s unique per item)
  3. _measura_amount: The total length value with unit, formatted as [amount] [unit]
    4.Examples:* "1.25 m", "4.75 cm"

Once this structure is understood, the pricing logic becomes clear.

https://apps.shopify.com/sell-by-weight