• Resolved princeofabyss

    (@princeofabyss)


    I need to calculate the shipping cost of a very specific cart scenario, and in order to avoid re-defining the unit base price, I’d like to retrieve and re-use it from a specific WBS rule. I’ve searched in the code (and in the DB) and I have a pretty solid knowledge of where all that info is stored. But is there any public method to get whole tree unserialized and then guide myself down to the data I need, or should I write my own method to read the option, and then find my way through? https://prnt.sc/nhjdGUR-ajMu In the previous image, I’d like the price marked by the arrow (supposing the rule’s key is 3)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dan

    (@dangoodman)

    You can start with the Wbs\ShippingMethod::loadRules() method to learn how the rules are parsed and find out if you can reuse the existing code for your needs.

    Thread Starter princeofabyss

    (@princeofabyss)

    I get a PHP Fatal error: ?Uncaught Error: Call to private method Wbs\ShippingMethod::loadRules() from context '' in ...

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Way to get the base cost charge for instance of WBS’ is closed to new replies.