What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, can anybody tell me, what the field “price_data” in “spy_price_product_store” is intended to

UPWG9AYH2
UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

Hello,
can anybody tell me, what the field “price_data” in “spy_price_product_store” is intended to be? Seems there must be json inside, i have seen various json encode/decode operations.
Best

Comments

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet

    It's one of the tables used for publishing to redis. The json data will be the value in redis.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Hmmm … Are you sure? 🤔 As far as i can see, the data published to redis is an array composed by net_price, gross_price etc …

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    array (
    ‘prices’ =>
    array (
    3 =>
    array (
    ‘CNY’ =>
    array (
    ‘priceData’ => NULL,
    ‘GROSS_MODE’ =>
    array (
    ‘DEFAULT’ => ‘40202’,
    ),
    ‘NET_MODE’ =>
    array (
    ‘DEFAULT’ => ‘35577’,
    ),
    ),
    ),
    ),
    ‘_timestamp’ => 1623867568.163507,
    )

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    edited June 2021

    There is also a price_data_checksum column which is dependent on the price_data … i wonder if i could use this to detect a change on prices somehow

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet
    edited June 2021

    My fault, the redis tables are suffixed _storage.

    I checked what we're doing with spy_price_product_store.price_data and I can tell that we're ignoring it. Our custom price import isn't populating price_data and price_data_checksum. Can't tell if these are legacy fields, but it doesn't seem to be used.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet

    They might be used for volume prices though.

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet
    edited June 2021

    Ah okay … i see it on some demo import file, but seems not to be intended to use as a free field for whatever^^maybe somebody from spryker could lighten us up

  • Stanislav Matveyev
    Stanislav Matveyev Sprykee Posts: 211 🧑🏻‍🚀 - Cadet

    Currently it's used for volume prices feature. It supposed to be used to add additional functionality in the future.

    So you can use it for your needs by adding new price_data your_key:{// any data}