Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Product
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 Mar 2016 at 08:01 UTC
Updated:
21 Mar 2016 at 20:24 UTC
Jump to comment: Most recent
After a fresh commerce install I went to /product/add/default where I can see the following text:
Products can't be created until a store has been added. Add a new store.
"Add a new store" links to "/store/add?destination=/product/add/default". Since however I only have the 'default' store type the "/store/add" page tries to redirect me to "/store/add/default" but it can't because of the destination query. So I end up on the same "/product/add/default" page.
Check the number of store entity types and link to "/store/add/[store-entity-type]?destination=/product/add/default" if there's only one.
Comments
Comment #2
harings_rob commentedComment #3
harings_rob commentedPR: https://github.com/drupalcommerce/commerce/pull/350
I have added a helper function as we need this link on multiple places.
Now it will send you to the add_form directly if there is one store type, in other cases it will send you to the add_page.
Comment #4
harings_rob commentedComment #5
harings_rob commentedNow that I see https://github.com/drupalcommerce/commerce/pull/347, we might want to create a helper class for this sort of functions in commerce_order as wel?
Comment #6
bojanz commentedComment #8
bojanz commentedWe ended up removing ?destination cause there's no way to make it work well (if you go to add-page to select a bundle, then that link loses ?destination)
Committed, thanks!
EDIT: D'oh, forgot to give commit credit. I'll make up for it in another commit :)