spree / spree_wombat

Connect your Spree Commerce storefront to Wombat
BSD 3-Clause "New" or "Revised" License
31 stars 53 forks source link

Suggestion: Set Inventory Handler also find by Admin Name #27

Closed onedanshow closed 10 years ago

onedanshow commented 10 years ago

The set inventory handler should also search by admin / internal name. Something like:

stock_location = Spree::StockLocation.find_by_name(stock_location_name) || Spree::StockLocation.find_by_admin_name(stock_location_name)

For here: https://github.com/spree/spree_wombat/blob/master/lib/spree/wombat/handler/set_inventory_handler.rb#L9

For us, our ERP spits out inventory levels with a warehouse code of "WBDS_P". That's great for an internal name, but not to display to the user on the Spree checkout page.

Just a thought.

JDutil commented 10 years ago

Would you mind submitting a PR?

onedanshow commented 10 years ago

Pull request made.

JDutil commented 10 years ago

closing out in favor of the pr thread