Reploverse Icon

Pulling Variant Values into Custom Line Item Properties in Real-Time

·
·

hey all - is there a way to pull a variant value into a Custom Line Item Property and have it update on change?

  • Avatar of Pylon
    Pylon
    APP
    ·
    ·

    Hi there, Ahmed here from Replo team.This will require custom code. You can refer to this guide on custom development with Replo and share it with your developer: https://support.replo.app/articles/1799213363-custom-development-with-replo

  • Avatar of Greg
    Greg
    ·
    ·

    I am the developer, but I can’t find anything on pulling the price or variant variables through

  • Avatar of Greg
    Greg
    ·
    ·

    how can you pull through variant variables to a custom code block?

  • Avatar of Pylon
    Pylon
    APP
    ·
    ·

    what do you mean by the variant variable? do you mean the variant title?

  • Avatar of Greg
    Greg
    ·
    ·

    No, the customer has the option to choose a Size and Colour, how can I get the selected Size value and pass it into a Custom Line Item Property? It’s required for calculating shipping

  • Avatar of Pylon
    Pylon
    APP
    ·
    ·

    you can get the variant ID from the "data-variant-id" and then you can use MutationObserver to listen for the changes on and then update it on the custom line property. please check the standardized attributes for more details: https://support.replo.app/articles/1799213363-custom-development-with-replo#standardized-attributes-6