Closed GoogleCodeExporter closed 8 years ago
e-commerce version: 3.1 05/09/2013 SilverStripe version: 3.1 from github When http://127.0.0.1/en-us/checkout/checkoutstep/orderformaddress/#OrderFormAddressO uter ----------------------------------------- [Strict Notice] Non-static method EcommerceRegion::i18n_singular_name() should not be called statically, assuming $this from incompatible context GET /en-us/checkout/checkoutstep/orderformaddress/ Line 225 in C:\wamp\www\ecommerce\code\model\address\OrderAddress.php Source 216 **/ 217 protected function getRegionField($name) { 218 if(EcommerceRegion::show()) { 219 $regionsForDropdown = EcommerceRegion::list_of_allowed_entries_for_dropdown(); 220 $count = count($regionsForDropdown); 221 if($count< 1) { 222 $regionField = new HiddenField($name, '', 0); 223 } 224 else { 225 $regionField = new DropdownField($name,EcommerceRegion::i18n_singular_name(), $regionsForDropdown); 226 if($count < 2) { 227 $regionField = $regionField->performReadonlyTransformation(); 228 } 229 else { 230 $regionField->setEmptyString(_t("OrderAdress.PLEASE_SELECT_REGION", "--- Select Region ---")); 231 } Trace OrderAddress->getRegionField(RegionID) BillingAddress.php:202 BillingAddress->getFields(Member) OrderFormAddress.php:85 OrderFormAddress->__construct(CheckoutPage_Controller,OrderFormAddress) SendaOrderFormAddress.php:5 SendaOrderFormAddress->__construct(CheckoutPage_Controller,OrderFormAddress) ReflectionClass->newInstanceArgs(Array) Injector.php:849 InjectionCreator->create(SendaOrderFormAddress,Array) Injector.php:486 Injector->instantiate(Array) Injector.php:794 Injector->get(SendaOrderFormAddress,,Array) Injector.php:831 Injector->createWithArgs(SendaOrderFormAddress,Array) Object.php:142 Object::create(CheckoutPage_Controller,OrderFormAddress) CheckoutPage.php:355 CheckoutPage_Controller->OrderFormAddress() ViewableData.php:363 ViewableData->obj(OrderFormAddress,,,1,) ViewableData.php:641 ViewableData_Customised->obj(OrderFormAddress,,,1) ViewableData.php:438 ViewableData->XML_val(OrderFormAddress,,1) call_user_func_array(Array,Array) SSViewer.php:178 SSViewer_Scope->__call(XML_val,Array) SSViewer.php:524 SSViewer_DataPresenter->__call(XML_val,Array) .cache.senda_ecommerce.templates.Includes.LayoutCheckoutPageInner.ss:161 SSViewer_DataPresenter->XML_val(OrderFormAddress,,1) .cache.senda_ecommerce.templates.Includes.LayoutCheckoutPageInner.ss:161 include(C:\wamp\www\silverstripe-cache\JOSE-PC\.cache.senda_ecommerce.templates.Includes.LayoutCheckoutPageInner.ss) SSViewer.php:927 SSViewer->includeGeneratedTemplate(C:\wamp\www/silverstripe-cache\JOSE-PC/.cache.senda_ecommerce.templates.Includes.LayoutCheckoutPageInner.ss,ViewableData_Customised,Array,Array,SSViewer_DataPresenter) SSViewer.php:994 SSViewer->process(ViewableData_Customised,Array,SSViewer_DataPresenter) SSViewer.php:1028 SSViewer::execute_template(LayoutCheckoutPageInner,ViewableData_Customised,Array,SSViewer_DataPresenter) .cache.senda_ecommerce.templates.Layout.CheckoutPage.ss:25 include(C:\wamp\www\silverstripe-cache\JOSE-PC\.cache.senda_ecommerce.templates.Layout.CheckoutPage.ss) SSViewer.php:927 SSViewer->includeGeneratedTemplate(C:\wamp\www/silverstripe-cache\JOSE-PC/.cache.senda_ecommerce.templates.Layout.CheckoutPage.ss,ViewableData_Customised,,Array,) SSViewer.php:994 SSViewer->process(ViewableData_Customised,) SSViewer.php:990 SSViewer->process(ViewableData_Customised) Controller.php:198 Controller->handleAction(SS_HTTPRequest,checkoutstep) RequestHandler.php:200 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) Controller.php:153 Controller->handleRequest(SS_HTTPRequest,DataModel) ContentController.php:220 ContentController->handleRequest(SS_HTTPRequest,DataModel) ModelAsController.php:68 ModelAsController->handleRequest(SS_HTTPRequest,DataModel) Director.php:325 Director::handleRequest(SS_HTTPRequest,Session,DataModel) Director.php:143 Director::direct(/en-us/checkout/checkoutstep/orderformaddress/,DataModel) main.php:189 ----------------------------------------- I guess the line 225 (OrderAddress.php) $regionField = new DropdownField($name,EcommerceRegion::i18n_singular_name(), $regionsForDropdown); should be: $regionField = new DropdownField($name,singleton("EcommerceRegion")->i18n_singular_name(), $regionsForDropdown); Regards, Jose A.
Original issue reported on code.google.com by supp...@sendasoft.com on 5 Sep 2013 at 4:26
supp...@sendasoft.com
THANK YOU ... FIXED>
Original comment by nfranc...@gmail.com on 5 Sep 2013 at 9:53
nfranc...@gmail.com
Original comment by nfranc...@gmail.com on 5 Sep 2013 at 10:06
Original issue reported on code.google.com by
supp...@sendasoft.com
on 5 Sep 2013 at 4:26