Checkout steps problem

80 views
Skip to first unread message

Josua

unread,
Aug 27, 2013, 12:48:13 PM8/27/13
to silverstrip...@googlegroups.com
Hi Nicolaas!

I have a question and do not know if this is a bug or not.
In my web I have two ecommerce.yml files, one is in the ecommerce/_config folder (default values) and the other in the mysite/_config folder.

If I check my settings for ecommerce:

http://127.0.0.1/dev/ecommerce/ecommercecheckconfiguration

2. CheckoutPage_Controller top
checkout_steps The Checkout Steps. This can be defined as you like, but the last step should always be: orderconfirmationandpayment.
Array
(
    [0] => orderitems
    [1] => orderformaddress
    [2] => orderconfirmationandpayment
    [3] => orderitems
    [4] => orderformaddress
    [5] => orderconfirmationandpayment
)
e-commerce defaults:
Array
(
    [0] => orderitems
    [1] => orderformaddress
    [2] => orderconfirmationandpayment
)


Both ecommerce.yml files have:
CheckoutPage_Controller:
  checkout_steps:
    - orderitems
    - orderformaddress
    - orderconfirmationandpayment

As you can see, the ecommerce.yml file of my folder mysite / _config not overwrite the steps of the other ecommerce.yml file, what happens is that both items are taken in account, so I have 6 steps in total.

Is this normal?

What can be done to take into account only the steps of my ecommerce.yml file from my folder mysite/_config?

Thanks,
Regards,
Jose A.


Nicolaas Thiemen Francken - Sunny Side Up

unread,
Aug 27, 2013, 6:24:15 PM8/27/13
to Silverstripe Ecommerce
Hi Jose

Good point.  I am not 10000% sure what to do about this long term, but in the short term I actually do it like this:

in mysite/_config/ecommerce.yml I ONLY PUT the config values I want to add. NOT the ones that have already been added in ecommerce/_config/ecommerce.yml.

Does that make sense?

Nicolaas


--
You received this message because you are subscribed to the Google Groups "Silverstripe Ecommerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecom...@googlegroups.com.
To post to this group, send email to silverstrip...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-ecommerce.
For more options, visit https://groups.google.com/groups/opt_out.



--
Nicolaas Thiemen Francken  
Sunny Side Up Ltd  {
  Skype: atyourservicehour
  Phone: +64 4 889 2773 
  Emergencies: 0221697577
  n...@sunnysideup.co.nz
  http://www.sunnysideup.co.nz
}







Nicolaas Thiemen Francken - Sunny Side Up

unread,
Aug 27, 2013, 6:36:22 PM8/27/13
to Silverstripe Ecommerce
Hi Jose,

The only problem with the approach discussed below that it is not so easy to remove configs in the mysite version of your ecommerce.yml.  I have tried to keep the ecommerce/_config/ecommerce.yml as basic as possible, but at the moment I dont think there is any way to remove a value other than:

Config::inst()->remove(bla) 

in your _config.php file.

I am going to research that more... Perhaps someone else has a better idea here.

Nicolaas

Marcus Nyeholt

unread,
Aug 27, 2013, 6:54:27 PM8/27/13
to silverstrip...@googlegroups.com
It's a problem in the core where config variables are always merged, not overwritten - see discussion at https://groups.google.com/forum/#!topic/silverstripe-dev/LRj6AhKIaMg and a not-yet-pull-requested commit at https://github.com/silverstripe-rebelalliance/sapphire/commit/b87187228a1b68a9490a8696cc9053a5c0b97628

Marcus Nyeholt

unread,
Aug 27, 2013, 6:54:53 PM8/27/13
to silverstrip...@googlegroups.com
The workaround for now is to use explicit Config::inst()->replace() calls from your _config.php file. 

Nicolaas Thiemen Francken - Sunny Side Up

unread,
Aug 27, 2013, 7:14:44 PM8/27/13
to Silverstripe Ecommerce
Hi Marcus

Thank you for clarifying this.

Josua

unread,
Aug 28, 2013, 5:48:49 AM8/28/13
to silverstrip...@googlegroups.com, n...@sunnysideup.co.nz, ma...@sunnysideup.co.nz
In the present case we must be able to insert steps between default steps, so the only way is to re-define all the steps in mysite/_config.
This functionality should be included in the Silverstripe core.

Thanks Nicolaas and Marcus,
Regards,
Jose A.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsub...@googlegroups.com.

To post to this group, send email to silverstrip...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-ecommerce.
For more options, visit https://groups.google.com/groups/opt_out.

Josua

unread,
Aug 28, 2013, 1:30:47 PM8/28/13
to silverstrip...@googlegroups.com
The same problem occurs with supported_methods.
This is a problem that should be corrected as soon as possible.
It is bizarre that has not been corrected yet, because it is a major problem. :(
This problem limits the configurability of yaml files and settings of silverstripe modules and extensions. :(

Regards,
Jose A.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsub...@googlegroups.com.

To post to this group, send email to silverstrip...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-ecommerce.
For more options, visit https://groups.google.com/groups/opt_out.
--
Nicolaas Thiemen Francken  
Sunny Side Up Ltd  {
  Skype: atyourservicehour
  Phone: +64 4 889 2773 
}










--
Nicolaas Thiemen Francken  
Sunny Side Up Ltd  {
  Skype: atyourservicehour
  Phone: +64 4 889 2773 
  Emergencies: 0221697577
  n...@sunnysideup.co.nz
  http://www.sunnysideup.co.nz
}







--
You received this message because you are subscribed to the Google Groups "Silverstripe Ecommerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsub...@googlegroups.com.

Nicolaas Thiemen Francken - Sunny Side Up

unread,
Aug 28, 2013, 5:03:56 PM8/28/13
to Silverstripe Ecommerce
Maybe I will write a small e-commerce method to allow more flexibility.

e.g.

MyClass:
  my_variable:
    _after_XXX1: XXX2

MyClass:
  my_variable:
    _before_YYY1: YYY2
 
MyClass:
  my_variable:
    _replace_ZZZ1: ZZZ2 

MyClass:
  my_variable:
    _remove_WWW1: WWW2

where XXX1, YYY2, ZZZ3, etc are values.

With the default being that the value is added to the existing array.




To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecom...@googlegroups.com.

To post to this group, send email to silverstrip...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-ecommerce.
For more options, visit https://groups.google.com/groups/opt_out.

Josua

unread,
Aug 29, 2013, 8:13:40 AM8/29/13
to silverstrip...@googlegroups.com, n...@sunnysideup.co.nz, ma...@sunnysideup.co.nz
Very good idea Nicolaas, I'll try it.

Thanks,
Regards.
Jose A.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsubscri...@googlegroups.com.
To post to this group, send email to silverstrip...@googlegroups.com.
--
Nicolaas Thiemen Francken  
Sunny Side Up Ltd  {
  Skype: atyourservicehour
  Phone: +64 4 889 2773 
}










--
Nicolaas Thiemen Francken  
Sunny Side Up Ltd  {
  Skype: atyourservicehour
  Phone: +64 4 889 2773 
}







--
You received this message because you are subscribed to the Google Groups "Silverstripe Ecommerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsubscri...@googlegroups.com.
To post to this group, send email to silverstrip...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Silverstripe Ecommerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsub...@googlegroups.com.
To post to this group, send email to silverstrip...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-ecommerce.
For more options, visit https://groups.google.com/groups/opt_out.

Josua

unread,
Aug 29, 2013, 12:53:58 PM8/29/13
to silverstrip...@googlegroups.com, n...@sunnysideup.co.nz, ma...@sunnysideup.co.nz
e-commerce version: 3.1 29/08/2013

SilverStripe version: 3.1 from github (29/08/2013)

The error seems to refer to the management of yaml.
This error only appears if I install the latest version of ecommerce (29/08/2013).

http://127.0.0.1/dev/build?flush=all

Error:
---------------------------------------------------

 Warning: Invalid argument supplied for foreach() in C:\wamp\www\framework\core\manifest\ConfigManifest.php on line 655
Call Stack
#	Time	Memory	Function	Location
1	0.0005	426128	{main}( )	..\main.php:0
2	0.0043	543240	ErrorControlChain->execute( )	..\main.php:167
3	0.0043	543848	ErrorControlChain->step( )	..\ErrorControlChain.php:117
4	0.0043	543832	call_user_func ( )	..\ErrorControlChain.php:125
5	0.0043	543848	{closure:C:\wamp\www\framework\main.php:117-160}( )	..\ErrorControlChain.php:125
6	0.0052	621720	require_once( 'C:\wamp\www\framework\core\Core.php' )	..\main.php:127
7	16.7248	5274392	SS_ConfigManifest->__construct( )	..\Core.php:116
8	19.5024	6501504	SS_ConfigManifest->buildYamlConfigVariant( )	..\ConfigManifest.php:107
9	19.5033	6519664	SS_ConfigManifest->mergeInYamlFragment( )	..\ConfigManifest.php:587

---------------------------------------------------

Thanks
Regards,
Jose A.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsubscri...@googlegroups.com.
To post to this group, send email to silverstrip...@googlegroups.com.
--
Nicolaas Thiemen Francken  
Sunny Side Up Ltd  {
  Skype: atyourservicehour
  Phone: +64 4 889 2773 
}










--
Nicolaas Thiemen Francken  
Sunny Side Up Ltd  {
  Skype: atyourservicehour
  Phone: +64 4 889 2773 
}







--
You received this message because you are subscribed to the Google Groups "Silverstripe Ecommerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsubscri...@googlegroups.com.
To post to this group, send email to silverstrip...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Silverstripe Ecommerce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-ecommerce+unsub...@googlegroups.com.
To post to this group, send email to silverstrip...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-ecommerce.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages