From 4b899b1eebad8435e5bb48fbd3c53afceeb25554 Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 27 Dec 2011 10:49:27 +0000 Subject: [PATCH] // Fix install on hooks + synchronise data --- install-new/classes/xmlLoader.php | 11 +- install-new/data/xml/category_group.xml | 4 +- install-new/data/xml/configuration.xml | 28 +-- install-new/data/xml/hook.xml | 172 +++++++++--------- install-new/fixtures/apple/data/address.xml | 2 +- .../fixtures/apple/data/carrier_group.xml | 4 +- .../fixtures/apple/data/category_group.xml | 12 +- install-new/fixtures/apple/data/customer.xml | 2 +- install-new/fixtures/apple/data/store.xml | 2 +- 9 files changed, 120 insertions(+), 117 deletions(-) diff --git a/install-new/classes/xmlLoader.php b/install-new/classes/xmlLoader.php index fadf414ad..5430b2524 100644 --- a/install-new/classes/xmlLoader.php +++ b/install-new/classes/xmlLoader.php @@ -746,7 +746,7 @@ class InstallXmlLoader if ($this->entityExists($entity)) $xml = $this->loadEntity($entity); else - $xml = new SimpleXMLElement(''); + $xml = new InstallSimplexmlElement(''); unset($xml->fields); // Fill attributes (config) @@ -843,7 +843,7 @@ class InstallXmlLoader if (!is_dir($this->lang_path.$iso.'/data')) mkdir($this->lang_path.$iso.'/data'); - $xml_node = new SimpleXMLElement(''); + $xml_node = new InstallSimplexmlElement(''); $this->createXmlEntityNodes($entity, $nodes, $xml_node); $xml_node->asXML($this->lang_path.$iso.'/data/'.$entity.'.xml'); } @@ -1120,9 +1120,12 @@ class InstallXmlLoader { $image = new Image($image['id_image']); $image_path = $image->getExistingImgPath(); - copy($from_path.$image_path.'.'.$image->image_format, $backup_path.$this->generateId('image', $image->id).'.'.$image->image_format); + if (file_exists($from_path.$image_path.'.'.$image->image_format)) + copy($from_path.$image_path.'.'.$image->image_format, $backup_path.$this->generateId('image', $image->id).'.'.$image->image_format); + foreach ($types as $type) - copy($from_path.$image_path.'-'.$type.'.'.$image->image_format, $backup_path.$this->generateId('image', $image->id).'-'.$type.'.'.$image->image_format); + if (file_exists($from_path.$image_path.'-'.$type.'.'.$image->image_format)) + copy($from_path.$image_path.'-'.$type.'.'.$image->image_format, $backup_path.$this->generateId('image', $image->id).'-'.$type.'.'.$image->image_format); } } diff --git a/install-new/data/xml/category_group.xml b/install-new/data/xml/category_group.xml index a61018734..3de4adcfd 100644 --- a/install-new/data/xml/category_group.xml +++ b/install-new/data/xml/category_group.xml @@ -5,8 +5,8 @@ - + - + diff --git a/install-new/data/xml/configuration.xml b/install-new/data/xml/configuration.xml index d22dde676..15fba6fce 100644 --- a/install-new/data/xml/configuration.xml +++ b/install-new/data/xml/configuration.xml @@ -192,13 +192,13 @@ 0 - 2011-12-22 23:47:41 + 2011-12-27 10:20:42 2 - 2011-12-22 23:47:41 + 2011-12-27 10:20:42 3 @@ -342,7 +342,7 @@ 1 - 1324594061 + 1324977642 1 @@ -494,6 +494,15 @@ 0 + + invoice + + + 2 + + + 2 + @@ -840,7 +849,7 @@ 1.5.0.2 - PrestaShop + Test raphael.malie@gmail.com @@ -849,16 +858,7 @@ 1 - 0 - - - invoice - - - 2 - - - 2 + 10 diff --git a/install-new/data/xml/hook.xml b/install-new/data/xml/hook.xml index 0d43c07ab..bcda45946 100644 --- a/install-new/data/xml/hook.xml +++ b/install-new/data/xml/hook.xml @@ -7,432 +7,432 @@ - + displayPayment Payment - + actionValidateOrder New orders - + actionPaymentConfirmation Payment confirmation - + displayPaymentReturn Payment return - + actionUpdateQuantity Quantity update Quantity is updated only when the customer effectively <b>place</b> his order. - + displayRightColumn Right column blocks - + displayLeftColumn Left column blocks - + displayHome Homepage content - + displayHeader Header of pages A hook which allow you to do things in the header of each pages - + actionCartSave Cart creation and update - + actionAuthentication Successful customer authentication - + actionProductAdd Product creation - + actionProductUpdate Product Update - + displayTop Top of pages A hook which allow you to do things a the top of each pages. - + displayRightColumnProduct Extra actions on the product page (right column). - + actionProductDelete Product deletion This hook is called when a product is deleted - + displayFooterProduct Product footer Add new blocks under the product description - + displayInvoice Invoice Add blocks to invoice (order) - + actionOrderStatusUpdate Order's status update event Launch modules when the order's status of an order change. - + displayAdminOrder Display in Back-Office, tab AdminOrder Launch modules when the tab AdminOrder is displayed on back-office. - + displayFooter Footer Add block in footer - + displayPDFInvoice PDF Invoice Allow the display of extra informations into the PDF invoice - + displayAdminCustomers Display in Back-Office, tab AdminCustomers Launch modules when the tab AdminCustomers is displayed on back-office. - + displayOrderConfirmation Order confirmation page Called on order confirmation page - + actionCustomerAccountAdd Successful customer create account Called when new customer create account successfuled - + displayCustomerAccount Customer account page display in front office Display on page account of the customer - + actionOrderSlipAdd Called when a order slip is created Called when a quantity of one product change in an order. - + displayProductTab Tabs on product page Called on order product page tabs - + displayProductTabContent Content of tabs on product page Called on order product page tabs - + displayShoppingCartFooter Shopping cart footer Display some specific informations on the shopping cart page - + displayCustomerAccountForm Customer account creation form Display some information on the form to create a customer account - + displayAdminStatsModules Stats - Modules - + displayAdminStatsGraphEngine Graph Engines - + actionOrderReturn Product returned - + displayProductButtons Product actions Put new action buttons on product page - + displayBackOfficeHome Administration panel homepage - + displayAdminStatsGridEngine Grid Engines - + actionWatermark Watermark - + actionProductCancel Product cancelled This hook is called when you cancel a product in an order - + displayLeftColumnProduct Extra actions on the product page (left column). - + actionProductOutOfStock Product out of stock Make action while product is out of stock - + actionProductAttributeUpdate Product attribute update - + displayCarrierList Extra carrier (module mode) - + displayShoppingCart Shopping cart extra button Display some specific informations - + actionSearch Search - + displayBeforePayment Redirect in order process Redirect user to the module instead of displaying payment modules - + actionCarrierUpdate Carrier Update This hook is called when a carrier is updated - + actionOrderStatusPostUpdate Post update of order status - + displayCustomerAccountFormTop Block above the form for create an account - + displayBackOfficeHeader Administration panel header - + displayBackOfficeTop Administration panel hover the tabs - + displayBackOfficeFooter Administration panel footer - + actionProductAttributeDelete Product Attribute Deletion - + actionCarrierProcess Carrier Process - + actionOrderDetail Order Detail To set the follow-up in smarty when order detail is called - + displayBeforeCarrier Before carrier list This hook is display before the carrier list on Front office - + displayOrderDetail Order detail displayed Displayed on order detail on front office - + actionPaymentCCAdd Payment CC added Payment CC added - + displayProductComparison Extra Product Comparison Extra Product Comparison - + actionCategoryAdd Category creation - + actionCategoryUpdate Category modification - + actionCategoryDelete Category removal - + actionBeforeAuthentication Before Authentication Before authentication - + displayPaymentTop Top of payment page Top of payment page - + actionHtaccessCreate After htaccess creation After htaccess creation - + actionAdminMetaSave After save configuration in AdminMeta After save configuration in AdminMeta - + displayAttributeGroupForm Add fileds to the form "attribute group" Add fileds to the form "attribute group" - + actionAttributeGroupSave On saving attribute group On saving attribute group - + actionAttributeGroupDelete On deleting attribute group On deleting attribute group - + displayFeatureForm Add fields to the form "feature" Add fields to the form "feature" - + actionFeatureSave On saving attribute feature On saving attribute feature - + actionFeatureDelete On deleting attribute feature On deleting attribute feature - + actionProductSave On saving products On saving products - + actionProductListOverride Assign product list to a category Assign product list to a category - + displayAttributeGroupPostProcess On post-process in admin attribute group On post-process in admin attribute group - + displayFeaturePostProcess On post-process in admin feature On post-process in admin feature - + displayFeatureValueForm Add fileds to the form "feature value" Add fileds to the form "feature value" - + displayFeatureValuePostProcess On post-process in admin feature value On post-process in admin feature value - + actionFeatureValueDelete On deleting attribute feature value On deleting attribute feature value - + actionFeatureValueSave On saving attribute feature value On saving attribute feature value - + displayAttributeForm Add fileds to the form "feature value" Add fileds to the form "feature value" - + actionAttributePostProcess On post-process in admin feature value On post-process in admin feature value - + actionAttributeDelete On deleting attribute feature value On deleting attribute feature value - + actionAttributeSave On saving attribute feature value On saving attribute feature value - + actionTaxManager Tax Manager Factory - + displayMyAccountBlock My account block Display extra informations inside the "my account" block diff --git a/install-new/fixtures/apple/data/address.xml b/install-new/fixtures/apple/data/address.xml index 70908e94f..f602105c9 100644 --- a/install-new/fixtures/apple/data/address.xml +++ b/install-new/fixtures/apple/data/address.xml @@ -32,7 +32,7 @@
16, Main street 2nd floor - Paris + Paris
diff --git a/install-new/fixtures/apple/data/carrier_group.xml b/install-new/fixtures/apple/data/carrier_group.xml index f663f440f..764d57278 100644 --- a/install-new/fixtures/apple/data/carrier_group.xml +++ b/install-new/fixtures/apple/data/carrier_group.xml @@ -5,8 +5,8 @@ - + - + diff --git a/install-new/fixtures/apple/data/category_group.xml b/install-new/fixtures/apple/data/category_group.xml index c92e4246d..e55a26874 100644 --- a/install-new/fixtures/apple/data/category_group.xml +++ b/install-new/fixtures/apple/data/category_group.xml @@ -5,14 +5,14 @@ - + - - + + - - + + - + diff --git a/install-new/fixtures/apple/data/customer.xml b/install-new/fixtures/apple/data/customer.xml index 2f064dcac..54a895787 100644 --- a/install-new/fixtures/apple/data/customer.xml +++ b/install-new/fixtures/apple/data/customer.xml @@ -19,7 +19,7 @@ - + pub@prestashop.com diff --git a/install-new/fixtures/apple/data/store.xml b/install-new/fixtures/apple/data/store.xml index e59814abc..f4ec91959 100644 --- a/install-new/fixtures/apple/data/store.xml +++ b/install-new/fixtures/apple/data/store.xml @@ -49,7 +49,7 @@ Coconut Grove 2999 SW 32nd Avenue - Miami + Miami a:7:{i:0;s:13:"09:00 - 19:00";i:1;s:13:"09:00 - 19:00";i:2;s:13:"09:00 - 19:00";i:3;s:13:"09:00 - 19:00";i:4;s:13:"09:00 - 19:00";i:5;s:13:"10:00 - 16:00";i:6;s:13:"10:00 - 16:00";}