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

Issue #350 fix #351

Closed
wants to merge 4 commits into from
Closed

Issue #350 fix #351

wants to merge 4 commits into from

Conversation

antonioperic
Copy link
Contributor

No description provided.

@@ -19,3 +19,6 @@ bin/doctrine*
bin/phpspec
bin/webunit
vendor/*

composer.phar
nbproject/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reverted and added to your global .gitignore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Thnx 👍

This reverts commit 46532fd.
@Richtermeister
Copy link
Contributor

I'm actually not 100% sure what's going on here, but I also noticed that the order numbers currently aren't being generated. What I can't figure out - how does "sylius.order.pre_create" ever get triggered? Is that happening on the Doctrine/Persistence level?

Also, just to confirm, are we generating order numbers only when orders are getting confirmed? That would seem to be the correct behavior, so we don't waste order numbers on temporary carts..

Thanks for helping me understand :)

@antonioperic
Copy link
Contributor Author

HI,

you can call it with:
$this->get('event_dispatcher')->dispatch('sylius.order.post_create', new GenericEvent($order));
where ever you want

i think that this will work also:
$this->dispatchCheckoutEvent('sylius.order.post_create', $order);

I agree with your logic that we should generate number only on completing order

@antonioperic
Copy link
Contributor Author

Another idea for this is to create class inside SalesBundle that will have OrderEvents (Similar as FosUserEvents) and than use that event inside Checkout process

What do you think about that? I think this is elegant solution and we can use SalesBundle as independent .

@pjedrzejewski @stloyd ?

@antonioperic
Copy link
Contributor Author

Also as I see at the moment FINALIZE_* events doesn't do nothing. Maybe to implement same logic as for order.pre_complete inside finalize.... but that will be reinventing the wheel maybe :/

@stloyd
Copy link
Contributor

stloyd commented Nov 2, 2013

Closing as the issue was probably fixed by #404.

@stloyd stloyd closed this Nov 2, 2013
@pjedrzejewski
Copy link
Member

^ confirmed.

pamil pushed a commit to pamil/Sylius that referenced this pull request Mar 21, 2016
[Resource] RepositoryInterface ref link label
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

Successfully merging this pull request may close these issues.

None yet

4 participants