per_item shipping calculator broken #1596

Closed
laurens opened this Issue May 24, 2012 · 4 comments

Comments

Projects
None yet
2 participants
Contributor

laurens commented May 24, 2012

The fix for #1524 (commit c347351) breaks the PerItem calculator for shipping methods.

The target_products method refers to a promotion, which a ShippingMethod does not have.

Leads to error on checkout: "undefined method promotion"

Member

radar commented May 24, 2012

Do you have some steps to reproduce this issue?

Contributor

laurens commented May 24, 2012

  • i created a fresh spree install (1.1.1) without sample data
  • created a product and a dummy payment method
  • added a shipping method with per item shipping
  • put a product into the cart
  • checkout

saving the delivery screen fails with "undefined method promotion"

radar added a commit that referenced this issue May 25, 2012

radar added a commit that referenced this issue May 25, 2012

Member

radar commented May 25, 2012

I have duplicated this issue in the tests committed to 1-1-stable and master. I will now revert #1524.

@radar radar closed this May 25, 2012

radar added a commit that referenced this issue May 25, 2012

radar added a commit that referenced this issue May 25, 2012

radar added a commit that referenced this issue May 25, 2012

radar added a commit that referenced this issue May 25, 2012

Member

radar commented May 25, 2012

This should now be fixed in both master and 1-1-stable with the commits titled "Re-add matching products limiter to per_item calculator" above.

Thanks for bringing this to our attention!

radar added a commit that referenced this issue May 29, 2012

radar added a commit that referenced this issue May 29, 2012

radar added a commit that referenced this issue May 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment