Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support volume discount for pricing.bundlePrices #5

Closed
mijnhost opened this issue Oct 22, 2019 · 4 comments
Closed

Support volume discount for pricing.bundlePrices #5

mijnhost opened this issue Oct 22, 2019 · 4 comments
Assignees

Comments

@mijnhost
Copy link

Volume discount is now officially supported by the Bol.com Retailer API.
Any plans of implanting this in the package?

@JeroenVanLeusden
Copy link

It should work already, the @todo's were there because it wasn't by the time this package was developed.

Are you experiencing issues using bundle prices?

@JeroenVanLeusden JeroenVanLeusden self-assigned this Oct 22, 2019
@mijnhost
Copy link
Author

mijnhost commented Oct 22, 2019

Yes, I'm experiencing issues. For example, when using this command:

// update offer price
$processStatus = $messageBus->dispatch(\BolCom\RetailerApi\Model\Offer\Command\UpdateOfferPrice::with(
  \BolCom\RetailerApi\Model\Offer\OfferId::fromString($strOfferId),
  \BolCom\RetailerApi\Model\Offer\Pricing::fromArray([
    'bundlePrices' => [
      ['quantity' => 1, 'price' => 20],
      ['quantity' => 2, 'price' => 39]
    ]
])), $arrBolAccount['account']);

I'm getting an exception:

`400 Bad request: `pricing.bundlePrices`: Collection should contain bundle price with prices in decreasing order (no duplicates).` response: (truncated...)

When I remove the second bundle price (with quantity 2), it's working. I also tried to change the order (first quantity 2, then quantity 1), but the same error.

@JeroenVanLeusden
Copy link

According to the docs:

The price per single unit in case the customer orders at least the quantity provided. When using more than 1 price, the respective prices must be in decreasing order

You're now telling bol.com that 1 product costs 20 and when ordering two products, it's 39 each. I think when you set the price below 20 it will work.

@mijnhost
Copy link
Author

You are right, that was the problem. Sorry for this and thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants