Fianet_Sceau - Version 1.1.0

Version Notes

Official commit

Download this release

Release Info

Developer Magento Core Team
Extension Fianet_Sceau
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.4 to 1.1.0

Files changed (56) hide show
  1. app/code/community/Fianet/Sceau/Block/Catalog/ProductsReviews.php +119 -2
  2. app/code/community/Fianet/Sceau/Block/Widget/Grid/Column/Renderer/Fianet.php +9 -24
  3. app/code/community/Fianet/Sceau/Helper/Data.php +46 -149
  4. app/code/community/Fianet/Sceau/Model/Avisproduits.php +7 -0
  5. app/code/community/Fianet/Sceau/Model/Avisproduits/Commentaires.php +7 -0
  6. app/code/community/Fianet/Sceau/Model/Fianet/Order/Sceau.php +110 -0
  7. app/code/community/Fianet/Sceau/Model/Fianet/Productsreviews.php +135 -0
  8. app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits.php +6 -0
  9. app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits/Collection.php +7 -0
  10. app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits/Commentaires.php +1 -0
  11. app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits/Commentaires/Collection.php +7 -0
  12. app/code/community/Fianet/Sceau/Model/Observer.php +19 -14
  13. app/code/community/Fianet/Sceau/Model/Order.php +0 -20
  14. app/code/community/Fianet/Sceau/Model/Source/Language.php +11 -0
  15. app/code/community/Fianet/Sceau/Model/Source/Mode.php +0 -17
  16. app/code/community/Fianet/Sceau/Model/Source/Pagination.php +1 -0
  17. app/code/community/Fianet/Sceau/Model/Source/Status.php +4 -7
  18. app/code/community/Fianet/Sceau/controllers/Adminhtml/CategoriesController.php.old +33 -0
  19. app/code/community/Fianet/Sceau/controllers/Adminhtml/ProductsController.php +1 -1
  20. app/code/community/Fianet/Sceau/controllers/Adminhtml/ShippingController.php +1 -1
  21. app/code/community/Fianet/Sceau/controllers/IndexController.php +16 -19
  22. app/code/community/Fianet/Sceau/controllers/ProductsreviewsController.php +41 -0
  23. app/code/community/Fianet/Sceau/etc/adminhtml.xml +2 -2
  24. app/code/community/Fianet/Sceau/etc/config.xml +31 -20
  25. app/code/community/Fianet/Sceau/etc/system.xml +81 -19
  26. app/code/community/Fianet/Sceau/sql/fianet_sceau_setup/mysql4-upgrade-1.0.4-1.1.0.php +1 -0
  27. app/design/adminhtml/default/default/template/fianet_sceau/products.phtml +1 -1
  28. app/design/frontend/base/default/layout/fianet_sceau.xml +6 -6
  29. app/design/frontend/base/default/template/fianet_sceau/page/html/logo.phtml +9 -8
  30. app/design/frontend/base/default/template/fianet_sceau/page/html/productsReviews.phtml +64 -8
  31. app/design/frontend/base/default/template/fianet_sceau/page/html/sceau.phtml +15 -12
  32. app/etc/modules/zFianet_Sceau.xml +2 -2
  33. app/locale/fr_FR/Fianet_Sceau.csv +16 -4
  34. package.xml +6 -6
  35. skin/adminhtml/default/default/images/sceau/ko.PNG +0 -0
  36. skin/adminhtml/default/default/images/sceau/ok.JPG +0 -0
  37. skin/adminhtml/default/default/images/sceau/ok.PNG +0 -0
  38. skin/adminhtml/default/default/images/sceau/top_left_block_login.png +0 -0
  39. skin/adminhtml/default/default/images/sceau/warning.gif +0 -0
  40. skin/frontend/base/default/images/sceau/10star.png +0 -0
  41. skin/frontend/base/default/images/sceau/15star.png +0 -0
  42. skin/frontend/base/default/images/sceau/20star.png +0 -0
  43. skin/frontend/base/default/images/sceau/25star.png +0 -0
  44. skin/frontend/base/default/images/sceau/30star.png +0 -0
  45. skin/frontend/base/default/images/sceau/35star.png +0 -0
  46. skin/frontend/base/default/images/sceau/40star.png +0 -0
  47. skin/frontend/base/default/images/sceau/45star.png +0 -0
  48. skin/frontend/base/default/images/sceau/50star.png +0 -0
  49. skin/frontend/base/default/images/sceau/5star.png +0 -0
  50. skin/frontend/base/default/images/sceau/fond_comment.png +0 -0
  51. skin/frontend/base/default/images/sceau/logo-fianet-transparent.png +0 -0
  52. skin/frontend/base/default/images/sceau/ncstar.png +0 -0
  53. skin/frontend/default/default/fianet/sceau.css +141 -0
  54. skin/frontend/default/default/fianet/sceau.js +38 -0
  55. skin/frontend/rwd/default/fianet/sceau.css +139 -0
  56. skin/frontend/rwd/default/fianet/sceau.js +38 -0
app/code/community/Fianet/Sceau/Block/Catalog/ProductsReviews.php CHANGED
@@ -1,13 +1,130 @@
1
  <?php
2
 
3
  class Fianet_Sceau_Block_Catalog_ProductsReviews extends Mage_Core_Block_Template {
 
4
 
 
 
 
 
 
5
  public function isModuleActive() {
6
- if (Mage::getStoreConfig('sceau/sceauconfg/active') == '1')
7
- {
8
  return true;
9
  }
10
  return false;
11
  }
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  }
1
  <?php
2
 
3
  class Fianet_Sceau_Block_Catalog_ProductsReviews extends Mage_Core_Block_Template {
4
+ protected $_product = null;
5
 
6
+ /**
7
+ * Return true if module is activated
8
+ *
9
+ * @return bool
10
+ */
11
  public function isModuleActive() {
12
+ if (Mage::getStoreConfig('sceau/sceauconfg/active') == '1') {
 
13
  return true;
14
  }
15
  return false;
16
  }
17
 
18
+ /**
19
+ * Return true if products reviews is activated
20
+ *
21
+ * @return bool
22
+ */
23
+ public function isProductsReviewsDisplayActive() {
24
+ if (Mage::getStoreConfig('sceau/productsreviewsconf/activedisplay') == '1') {
25
+ return true;
26
+ }
27
+ return false;
28
+ }
29
+
30
+ /**
31
+ * Retrieve current product model
32
+ *
33
+ * @return Mage_Catalog_Model_Product
34
+ */
35
+ function getProduct() {
36
+ if (!$this->_product) {
37
+ $this->_product = Mage::registry('product');
38
+ }
39
+ return $this->_product;
40
+ }
41
+
42
+ /**
43
+ * Retrieve current product review
44
+ *
45
+ * @return Fianet_Sceau_Model_Avisproduits
46
+ */
47
+ function getProductReview($productID) {
48
+ return Mage::getModel('sceau/avisproduits')->load($productID);
49
+ }
50
+
51
+ /**
52
+ * Retrieve current product review comments
53
+ *
54
+ * @return Array of Fianet_Sceau_Model_Avisproduits_Commentaires
55
+ */
56
+ function getTabProductReviewComments($productID) {
57
+ $time = Mage::getStoreConfig('sceau/productsreviewsconf/daysnotdisplay');
58
+ $collection = Mage::getModel('sceau/avisproduits_commentaires')->getCollection()
59
+ ->addFieldToFilter('product_id', $productID)
60
+ ->setOrder('date', 'DESC');
61
+
62
+ // Si une date max d'affichage des avis est renseigné, alors on ajoute le filtre
63
+ if(isset($time) && is_numeric($time)){
64
+ $dateMax = new DateTime(date('Y-m-d H:i:s', time() - ($time * 24 * 60 * 60)));
65
+ $collection->addFieldToFilter('date', array('from' => $dateMax->format('Y-m-d H:i:s')));
66
+ }
67
+ $collection->load();
68
+ return $collection->getData();
69
+ }
70
+
71
+ function getNote(float $note) {
72
+ $val = (string)floatval($note);
73
+ if(!ctype_digit($val)) {
74
+ $intPart = floor($note);
75
+ $decimalPart = str_replace('0.','',$note - $intPart);
76
+ return "<p>".$intPart."</p>,". $decimalPart;
77
+ } else
78
+ return "<p>".$val."</p>";
79
+ }
80
+
81
+ function getCalculatedNote($note) {
82
+ return (ceil($note*2)/2)*10;
83
+ }
84
+
85
+ function getFirstIDToDisplay($currentPage, $numberPagination) {
86
+ return $currentPage * $numberPagination - $numberPagination;
87
+ }
88
+
89
+ function getMaxPage($numberReviews, $numberPagination) {
90
+ return ceil($numberReviews / $numberPagination);
91
+ }
92
+
93
+ function getStrDate(DateTime $date) {
94
+ return "Le " . $date->format("d/m/Y &#224; H\hi");
95
+ }
96
+
97
+ function getFormattedComment($comment, $reviewID) {
98
+ if (strlen($comment) > 190) {
99
+ // Coupe la chaine en deux
100
+ $commentVisible = mb_substr($comment,0,190,'UTF-8');
101
+ $commentInvisible = mb_substr($comment, 190, strlen($comment), 'UTF-8');
102
+ $comment = $commentVisible . "<span id='linktext" . $reviewID . "'>... <a href='javascript:toggleVisibility(" . $reviewID . ")'>Lire la suite</a></span>";
103
+ $comment .= "<span id='text" . $reviewID . "' style='visibility: hidden; display: none;'>" . $commentInvisible . " <a href='javascript:toggleInvisibility(" . $reviewID . ")'>R&eacute;duire le texte</a></span>";
104
+ }
105
+ return $comment;
106
+ }
107
+
108
+ function getPagination($currentPage, $maxPage) {
109
+ $text = "";
110
+ if ($maxPage > 1) {
111
+ $currentUrl = $this->helper('core/url')->getCurrentUrl();
112
+ $text = 'Page ';
113
+ for($i=1;$i<=$maxPage;$i++) {
114
+ if($i!=1) {
115
+ $text .= '&#x9;';
116
+ }
117
+ if($i == $currentPage) {
118
+ $text .= '[ '.$i.' ]';
119
+ } else {
120
+ $text .= '<form id="pageSceau' . $i . '" action="' . $currentUrl . '" method="POST">';
121
+ $text .= '<input type="hidden" name="form_key" value="' . Mage::getSingleton('core/session')->getFormKey() . '" />';
122
+ $text .= '<input type="hidden" name="pageReviews" value="' . $i . '" />';
123
+ $text .= '</form>';
124
+ $text .= '<a href="#" onclick="pageSceau' . $i . '.submit()">'.$i.'</a>';
125
+ }
126
+ }
127
+ }
128
+ return $text;
129
+ }
130
  }
app/code/community/Fianet/Sceau/Block/Widget/Grid/Column/Renderer/Fianet.php CHANGED
@@ -16,51 +16,36 @@
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sceau_Block_Widget_grid_column_renderer_fianet extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
19
- const PICTO_KO = "ko.PNG";
20
- const PICTO_OK = "ok.PNG";
21
 
22
  public function render(Varien_Object $row) {
23
  $sent_prod = $row->getData('fianet_sceau_order_sent_prod');
24
  $sent_preprod = $row->getData('fianet_sceau_order_sent_preprod');
25
  $sent_error = $row->getData('fianet_sceau_order_sent_error');
26
- if (!Mage::Helper('fianet_sceau/Data')->isModuleActive($row))
27
- {//si le module est désactivé sur le front de la commande
28
  return 'Module désactivé';
29
- }
30
-
31
-
32
 
33
  $text_pprod = '';
34
 
35
  $icon = self::PICTO_KO;
36
- /*if($sent_preprod == 0 && $sent_prod==0){}*/
37
- if($sent_preprod == 1 && $sent_prod==0)
38
- {
39
  $icon = self::PICTO_OK;
40
  $text_pprod = " [Test]";
41
  }
42
- elseif($sent_preprod == 0 && $sent_prod==1)
43
- {
44
  $icon = self::PICTO_OK;
45
  }
46
- elseif($sent_preprod == 1 && $sent_prod==1)
47
- {
48
  $icon = self::PICTO_OK;
49
  }
50
- $html = "<img src=" . $this->getSkinUrl('images/sceau/' . $icon)." WIDTH=20 >".$text_pprod;
51
- //$html .= $row->getData('fianet_sceau_order_sent');
52
 
53
  $order= Mage::getModel('sales/order')->load($row->getId());
54
 
55
- /*
56
- Zend_Debug::dump($row->getData('fianet_sceau_order_sent_prod'));
57
- Zend_Debug::dump($row->getData('fianet_sceau_order_sent_preprod'));
58
-
59
- Zend_Debug::dump($order->getData('fianet_sceau_order_sent_prod'), 'order->fianet_sceau_order_sent_prod');
60
- Zend_Debug::dump($order->getData('fianet_sceau_order_sent_preprod'), 'order->fianet_sceau_order_sent_preprod');
61
- */
62
  if($sent_error==1)
63
- $html .= "<img src=" . $this->getSkinUrl('images/sceau/warning.gif')." WIDTH=20 >";
64
  return ($html);
65
  }
66
  }
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sceau_Block_Widget_grid_column_renderer_fianet extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
19
+ const PICTO_KO = "cancel_btn_icon.gif";
20
+ const PICTO_OK = "fam_bullet_success.gif";
21
 
22
  public function render(Varien_Object $row) {
23
  $sent_prod = $row->getData('fianet_sceau_order_sent_prod');
24
  $sent_preprod = $row->getData('fianet_sceau_order_sent_preprod');
25
  $sent_error = $row->getData('fianet_sceau_order_sent_error');
26
+ if (!Mage::Helper('fianet_sceau/Data')->isModuleActive($row)) {//si le module est désactivé sur le front de la commande
 
27
  return 'Module désactivé';
28
+ }
 
 
29
 
30
  $text_pprod = '';
31
 
32
  $icon = self::PICTO_KO;
33
+ if($sent_preprod == 1 && $sent_prod==0) {
 
 
34
  $icon = self::PICTO_OK;
35
  $text_pprod = " [Test]";
36
  }
37
+ elseif($sent_preprod == 0 && $sent_prod==1) {
 
38
  $icon = self::PICTO_OK;
39
  }
40
+ elseif($sent_preprod == 1 && $sent_prod==1) {
 
41
  $icon = self::PICTO_OK;
42
  }
43
+ $html = "<img src=" . $this->getSkinUrl('images/' . $icon)." WIDTH=20 >".$text_pprod;
 
44
 
45
  $order= Mage::getModel('sales/order')->load($row->getId());
46
 
 
 
 
 
 
 
 
47
  if($sent_error==1)
48
+ $html .= "<img src=" . $this->getSkinUrl('images/fianet/attention.gif')." WIDTH=20 >";
49
  return ($html);
50
  }
51
  }
app/code/community/Fianet/Sceau/Helper/Data.php CHANGED
@@ -1,92 +1,49 @@
1
  <?php
2
 
3
  class Fianet_Sceau_Helper_Data extends Mage_Core_Helper_Abstract {
 
 
 
 
4
  const ORDER_ATTR_SCEAU_SENT_PROD = 'fianet_sceau_order_sent_prod';
5
  const ORDER_ATTR_SCEAU_SENT_PPROD = 'fianet_sceau_order_sent_preprod';
6
- const ORDER_ATTR_SCEAU_SENT_ERROR= 'fianet_sceau_order_sent_error';
7
-
8
- static function Generate_Sceau_xml(Mage_Sales_Model_Order $order) {
9
- //récupération des informations
10
- $version = (string) Mage::getConfig()->getModuleConfig('Fianet_Sceau')->version;
11
- $email = self::clean_invalid_char($order->customer_email);
12
- $timestamp = Mage::getModel('core/date')->date(null,strtotime($order->created_at));
13
- $refid = self::clean_invalid_char($order->increment_id);
14
- $privatekey = Mage::getStoreConfig('sceau/sceauconfg/private_key', $order->getStoreId());
15
- $crypt = md5($privatekey . "_" . $refid . "+" . $timestamp . "=" . $email);
16
-
17
- //Si l'IP de l'internaute n'est pas présente dans Magento (en cas de création de commande depuis le BO) alors on récupère l'IP de la boutique
18
- $ip = (!$order->getRemoteIp()) ? $_SERVER['REMOTE_ADDR'] : $order->getRemoteIp();
19
-
20
- //récupération des informations de livraison
21
- $shipping_code = $order->getShippingCarrier()->getCarrierCode();
22
- $shipping = Mage::getModel('sceau/shipping_association')->load($shipping_code);
23
-
24
- //Si le titre du prénom est renseigné dans la commande, alors il s'ajoute au flux XML
25
- $titre = '';
26
- if ($order->customer_gender)
27
- $titre = ' titre="' . $order->customer_gender . '"';
28
-
29
- $xml = '';
30
- $xml .= '<?xml version="1.0" encoding="UTF-8"?>';
31
- $xml .= '<control fianetmodule="Magento_Sceau" version="' . $version . '">';
32
- $xml .= '<utilisateur><nom' . $titre . '><![CDATA[' . self::clean_invalid_char($order->customer_lastname) . ']]></nom>';
33
- $xml .= '<prenom><![CDATA[' . self::clean_invalid_char($order->customer_firstname) . ']]></prenom>';
34
- $xml .= '<email><![CDATA[' . $email . ']]></email>';
35
- $xml .= '</utilisateur>';
36
- $xml .= '<infocommande>';
37
- $xml .= '<siteid><![CDATA[' . self::getSiteID($order) . ']]></siteid>';
38
- $xml .= '<refid><![CDATA[' . $refid . ']]></refid>';
39
- $xml .= '<montant devise="' . $order->base_currency_code .'"><![CDATA[' . $order->base_grand_total . ']]></montant>';
40
- $xml .= '<ip timestamp="' . $timestamp . '"><![CDATA[' . $ip . ']]></ip>';
41
-
42
- if ($shipping)
43
- $xml .= '<typelivraison><![CDATA[' . $shipping->getFianetSceauShippingType() . ']]></typelivraison>';
44
- else
45
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s error in shipping configuration.', $order->getIncrementId()));
46
 
47
- $xml .= '<produits>';
48
- foreach ($order->getAllVisibleItems() as $item) {
49
- $Product= Mage::getModel('catalog/product')->load($item->getProductId());
50
- $categories = $Product->getCategoryIds();
51
- $type = Mage::getModel('sceau/categories_association')->load($categories[0])->getFianetSceauCategoryType();
52
- $amount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount() + $item->getBaseTaxAmount() + $item->getBaseWeeeTaxAppliedRowAmount();
53
- $pName = $item->getName();
54
- $pSku = $item->getSku();
55
- if ($item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
56
- $childrenProduct = $item->getChildrenItems();
57
- if (count($childrenProduct) == 1) {
58
- $pName = $childrenProduct[0]->getName();
59
- $pSku = $childrenProduct[0]->getSku();
60
- }
61
- }
62
 
63
- $xml .= '<produit>';
64
- $xml .= '<id><![CDATA[' . self::clean_invalid_char($pSku) . ']]></id>';
65
- if ($type)
66
- $xml .= '<categorie><![CDATA[' . $type . ']]></categorie>';
67
- else
68
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s error in products configuration.', $order->getIncrementId()));
69
-
70
- $xml .= '<libelle><![CDATA[' . self::clean_invalid_char($pName) . ']]></libelle>';
71
- $xml .= '<montant><![CDATA[' . $amount . ']]></montant>';
72
-
73
- try {
74
- if ($Product->getImageUrl())
75
- $xml .= '<image><![CDATA[' . $Product->getImageUrl() . ']]></image>';
76
- } catch (Exception $e) {
77
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s Exception error: %s.', $order->getIncrementId(), $e->getMessage()));
78
  }
79
 
80
- $xml .= '</produit>';
 
 
 
 
 
 
81
  }
82
- $xml .= '</produits>';
83
- $xml .= '</infocommande>';
84
- $xml .= '<crypt><![CDATA[' . $crypt . ']]></crypt>';
85
- $xml .= "</control>";
86
-
87
- $xml = self::clean_xml($xml);
88
-
89
- return $xml;
 
 
 
 
90
  }
91
 
92
  static public function clean_xml($xml) {
@@ -104,27 +61,19 @@ class Fianet_Sceau_Helper_Data extends Mage_Core_Helper_Abstract {
104
  //supprimes les balises html
105
  $var = strip_tags($var);
106
  //$var = str_replace("&", "&&amp;", $var);
 
 
 
 
 
107
  $var = str_replace('&', '', $var);
108
  $var = str_replace("<", "&lt;", $var);
109
  $var = str_replace(">", "&gt;", $var);
 
110
  $var = trim($var);
111
  return ($var);
112
  }
113
 
114
- static function processOrderToFianet(Mage_Sales_Model_Order $order) {
115
- if (self::sendOrderToFianet($order)) {
116
-
117
- $attribut_sceau = self::ORDER_ATTR_SCEAU_SENT_PPROD;
118
-
119
- if (self::sendingMode($order) == Fianet_Sceau_Model_Source_Mode::MODE_PROD) {
120
- $attribut_sceau = self::ORDER_ATTR_SCEAU_SENT_PROD;
121
- }
122
- $order->setData($attribut_sceau, '1');
123
- return true;
124
- }
125
- return false;
126
- }
127
-
128
  static function getStatusesConfig() {
129
  return explode(',', Mage::getStoreConfig('sceau/sceauconfg/orderstatuses'));
130
  }
@@ -133,58 +82,6 @@ class Fianet_Sceau_Helper_Data extends Mage_Core_Helper_Abstract {
133
  return in_array($order->getData('status'), self::getStatusesConfig());
134
  }
135
 
136
- static function sendOrderToFianet(Mage_Sales_Model_Order $order) {
137
- $flux = self::Generate_Sceau_xml($order);
138
-
139
- $url = self::getFianetUrl($order);
140
- $config = array('maxredirects' => 0,
141
- 'timeout' => 5);
142
-
143
- $params = array('SiteID' => self::getSiteID($order),
144
- 'CheckSum' => md5($flux),
145
- 'XMLInfo' => $flux);
146
-
147
- Mage::dispatchEvent('Fianet_Sceau_Before_Send_Order', array('order' => $order, 'url' => $url, 'flux' => $flux));
148
-
149
- try {
150
- $client = new Zend_Http_Client($url, $config);
151
- $client->setMethod(Zend_Http_Client::POST);
152
- $client->setParameterPost($params);
153
- $response = $client->request();
154
-
155
- Mage::dispatchEvent('Fianet_Sceau_After_Send_Order', array('order' => $order, 'response' => $response));
156
-
157
- return self::parseFianetResponse($response, $order);
158
- } catch (Exception $e) {
159
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s sending error : %s.', $order->getIncrementId(), $e->getMessage()));
160
- Mage::getSingleton('adminhtml/session')->addError('FIA-NET Sceau sending error : ' . $e->getMessage());
161
- }
162
- }
163
-
164
- static function parseFianetResponse($response, Mage_Sales_Model_Order $order) {
165
- $attribut_sceau_error = self::ORDER_ATTR_SCEAU_SENT_ERROR;
166
- if ($response->isSuccessful()) {
167
- $xml = $response->getBody();
168
-
169
- $simplexml = new Varien_Simplexml_Config($xml);
170
- if ($simplexml->getNode()->getAttribute('type') == 'OK') {
171
- $order->setData($attribut_sceau_error, '0');
172
- return true;
173
- }
174
- }
175
- if ($simplexml->getNode()->detail == '')
176
- {
177
- $order->setData($attribut_sceau_error, '1');
178
- $ret = "erreur de flux";
179
- }
180
- else
181
- $ret = $simplexml->getNode()->detail;
182
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s sending error : %s.', $order->getIncrementId(), $ret));
183
- Mage::getSingleton('adminhtml/session')->addError('FIA-NET Sceau sending error : ' . $ret);
184
-
185
- return false;
186
- }
187
-
188
  static function getFianetUrl(Mage_Sales_Model_Order $order) {
189
  $url = Mage::getStoreConfig('sceau/sceaulinks/test_send_url');
190
 
@@ -217,7 +114,7 @@ class Fianet_Sceau_Helper_Data extends Mage_Core_Helper_Abstract {
217
  return "blanc";
218
  }
219
 
220
- static public function isOrderAlreadySent(Mage_Sales_Model_Order $order) {
221
  $attribute_name = self::ORDER_ATTR_SCEAU_SENT_PPROD;
222
  if (self::sendingMode($order) == Fianet_Sceau_Model_Source_Mode::MODE_PROD) {
223
  $attribute_name = self::ORDER_ATTR_SCEAU_SENT_PROD;
@@ -229,7 +126,7 @@ class Fianet_Sceau_Helper_Data extends Mage_Core_Helper_Abstract {
229
  return false;
230
  }
231
 
232
- static public function getMagentoVersion() {
233
  $version = Mage::getVersion();
234
  $version = substr($version, 0, 5);
235
  $version = str_replace('.', '', $version);
@@ -239,14 +136,14 @@ class Fianet_Sceau_Helper_Data extends Mage_Core_Helper_Abstract {
239
  return (int) $version;
240
  }
241
 
242
- static function isModuleActive($order) {
243
  if (Mage::getStoreConfig('sceau/sceauconfg/active', $order->getStoreId()) == '1') {
244
  return true;
245
  }
246
  return false;
247
  }
248
 
249
- static function sendingMode(Mage_Sales_Model_Order $order) {
250
  return Mage::getStoreConfig('sceau/sceauconfg/mode', $order->getStoreId());
251
  }
252
  }
1
  <?php
2
 
3
  class Fianet_Sceau_Helper_Data extends Mage_Core_Helper_Abstract {
4
+ protected $_resource = null;
5
+ protected $_readConnection = null;
6
+ protected $_writeConnection = null;
7
+ protected $_tables = array();
8
  const ORDER_ATTR_SCEAU_SENT_PROD = 'fianet_sceau_order_sent_prod';
9
  const ORDER_ATTR_SCEAU_SENT_PPROD = 'fianet_sceau_order_sent_preprod';
10
+
11
+ static public function processResponse(Mage_Sales_Model_Order $order, $result) {
12
+ $_resource = Mage::getSingleton('core/resource');
13
+ $_readConnection = $_resource->getConnection('core_read');
14
+ $_writeConnection = $_resource->getConnection('core_write');
15
+ $_tables = array($_resource->getTableName('sales/order'));
16
+ $orderGrid = $_resource->getTableName('sales/order_grid');
17
+ if ($orderGrid)
18
+ $_tables[] = $orderGrid;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
+ if ($result) {
21
+ $attribut_sceau = self::ORDER_ATTR_SCEAU_SENT_PPROD;
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
+ if (self::sendingMode($order) == Fianet_Sceau_Model_Source_Mode::MODE_PROD) {
24
+ $attribut_sceau = self::ORDER_ATTR_SCEAU_SENT_PROD;
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
+ // Mise à jour par SQL pour éviter incompatibilité avec Certissim
28
+ foreach ($_tables as $table) {
29
+ $queryW = "UPDATE `{$table}` ";
30
+ $queryW .= "SET `{$attribut_sceau}` = '1'";
31
+ $queryW .= "WHERE `entity_id` = '{$order->getEntityId()}';";
32
+ $_writeConnection->query($queryW);
33
+ }
34
  }
35
+ }
36
+
37
+ static public function canSendOrder(Mage_Sales_Model_Order $order) {
38
+ if (!self::isModuleActive($order)) {//si le module est désactivé
39
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: module disabled, order #%s not sent.', $order->getIncrementId()));
40
+ return false;
41
+ } else if (self::isOrderAlreadySent($order)) {//Si la commande a déjà été envoyée
42
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s already sent.', $order->getIncrementId()));
43
+ return false;
44
+ }
45
+
46
+ return true;
47
  }
48
 
49
  static public function clean_xml($xml) {
61
  //supprimes les balises html
62
  $var = strip_tags($var);
63
  //$var = str_replace("&", "&&amp;", $var);
64
+ $var = str_replace('&copy;','', $var);
65
+ $var = str_replace('©','', $var);
66
+ $var = str_replace('&reg;','', $var);
67
+ $var = str_replace('®','', $var);
68
+ $var = str_replace('','',$var);
69
  $var = str_replace('&', '', $var);
70
  $var = str_replace("<", "&lt;", $var);
71
  $var = str_replace(">", "&gt;", $var);
72
+ $var = str_replace("&#47;","", $var);
73
  $var = trim($var);
74
  return ($var);
75
  }
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  static function getStatusesConfig() {
78
  return explode(',', Mage::getStoreConfig('sceau/sceauconfg/orderstatuses'));
79
  }
82
  return in_array($order->getData('status'), self::getStatusesConfig());
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  static function getFianetUrl(Mage_Sales_Model_Order $order) {
86
  $url = Mage::getStoreConfig('sceau/sceaulinks/test_send_url');
87
 
114
  return "blanc";
115
  }
116
 
117
+ public static function isOrderAlreadySent(Mage_Sales_Model_Order $order) {
118
  $attribute_name = self::ORDER_ATTR_SCEAU_SENT_PPROD;
119
  if (self::sendingMode($order) == Fianet_Sceau_Model_Source_Mode::MODE_PROD) {
120
  $attribute_name = self::ORDER_ATTR_SCEAU_SENT_PROD;
126
  return false;
127
  }
128
 
129
+ public static function getMagentoVersion() {
130
  $version = Mage::getVersion();
131
  $version = substr($version, 0, 5);
132
  $version = str_replace('.', '', $version);
136
  return (int) $version;
137
  }
138
 
139
+ public static function isModuleActive($order) {
140
  if (Mage::getStoreConfig('sceau/sceauconfg/active', $order->getStoreId()) == '1') {
141
  return true;
142
  }
143
  return false;
144
  }
145
 
146
+ public static function sendingMode(Mage_Sales_Model_Order $order) {
147
  return Mage::getStoreConfig('sceau/sceauconfg/mode', $order->getStoreId());
148
  }
149
  }
app/code/community/Fianet/Sceau/Model/Avisproduits.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_Model_Avisproduits extends Mage_Core_Model_Abstract {
3
+ protected function _construct() {
4
+ parent::_construct();
5
+ $this->_init('sceau/avisproduits');
6
+ }
7
+ }
app/code/community/Fianet/Sceau/Model/Avisproduits/Commentaires.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_Model_Avisproduits_Commentaires extends Mage_Core_Model_Abstract {
3
+ protected function _construct() {
4
+ parent::_construct();
5
+ $this->_init('sceau/avisproduits_commentaires');
6
+ }
7
+ }
app/code/community/Fianet/Sceau/Model/Fianet/Order/Sceau.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Fianet_Sceau_Model_Fianet_Order_Sceau {
4
+ public static function generateSceauXML(Mage_Sales_Model_Order $order) {
5
+ //récupération des informations
6
+ $version = (string) Mage::getConfig()->getModuleConfig('Fianet_Sceau')->version;
7
+ $email = Mage::Helper('fianet_sceau/Data')->clean_invalid_char($order->customer_email);
8
+ $timestamp = Mage::getModel('core/date')->date(null,strtotime($order->created_at));
9
+ $refid = Mage::Helper('fianet_sceau/Data')->clean_invalid_char($order->increment_id);
10
+ $privatekey = Mage::getStoreConfig('sceau/sceauconfg/private_key', $order->getStoreId());
11
+ $crypt = md5($privatekey . "_" . $refid . "+" . $timestamp . "=" . $email);
12
+ $language = Mage::getStoreConfig('sceau/sceauconfg/language', $order->getStoreId());
13
+
14
+ //Si l'IP de l'internaute n'est pas présente dans Magento (en cas de création de commande depuis le BO) alors on récupère l'IP de la boutique
15
+ $ip = (!$order->getRemoteIp()) ? $_SERVER['REMOTE_ADDR'] : $order->getRemoteIp();
16
+
17
+ //Si le titre du prénom est renseigné dans la commande, alors il s'ajoute au flux XML
18
+ $titre = '';
19
+ if ($order->customer_gender)
20
+ $titre = ' titre="' . $order->customer_gender . '"';
21
+
22
+ $xml = '';
23
+ $xml .= '<?xml version="1.0" encoding="UTF-8"?>';
24
+ $xml .= '<control fianetmodule="Magento_Sceau" version="' . $version . '">';
25
+ $xml .= '<utilisateur><nom' . $titre . '><![CDATA[' . Mage::Helper('fianet_sceau/Data')->clean_invalid_char($order->customer_lastname) . ']]></nom>';
26
+ $xml .= '<prenom><![CDATA[' . Mage::Helper('fianet_sceau/Data')->clean_invalid_char($order->customer_firstname) . ']]></prenom>';
27
+ $xml .= '<email><![CDATA[' . $email . ']]></email>';
28
+ $xml .= '</utilisateur>';
29
+ $xml .= '<infocommande>';
30
+ $xml .= '<siteid><![CDATA[' . Mage::Helper('fianet_sceau/Data')->getSiteID($order) . ']]></siteid>';
31
+ $xml .= '<refid><![CDATA[' . $refid . ']]></refid>';
32
+ $xml .= '<langue><![CDATA[' . $language . ']]></langue>';
33
+ $xml .= '<montant devise="' . $order->base_currency_code .'"><![CDATA[' . number_format($order->base_grand_total, 2, '.', '') . ']]></montant>';
34
+ $xml .= '<ip timestamp="' . $timestamp . '"><![CDATA[' . $ip . ']]></ip>';
35
+
36
+ //récupèration des informations de livraison
37
+ if ($order->getShippingCarrier()) {
38
+ $shipping_code = $order->getShippingCarrier()->getCarrierCode();
39
+ $shipping = Mage::getModel('sceau/shipping_association')->load($shipping_code);
40
+ if ($shipping)
41
+ $xml .= '<typelivraison><![CDATA[' . $shipping->getFianetSceauShippingType() . ']]></typelivraison>';
42
+ else
43
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s error in shipping configuration.', $order->getIncrementId()));
44
+ }
45
+
46
+ //Si l'affichage des avis produits est activé, alors le balise est ajouté aux flux.
47
+ if (Mage::getStoreConfig('sceau/productsreviewsconf/active', $order->getStoreId()) == "1") {
48
+ $storeCode = Mage::app()->getStore(true)->getCode();
49
+ $params = array('___store' => $storeCode, Mage::getSingleton('checkout/session')->getSessionIdQueryParam() => Mage::getSingleton('checkout/session')->getEncryptedSessionId());
50
+ $url = Mage::getUrl('sceau/productsreviews/save', $params);
51
+
52
+ try {
53
+ $xml .= '<produits>';
54
+ $xml .= '<urlwebservice><![CDATA[' . $url . ']]></urlwebservice>';
55
+ foreach ($order->getAllVisibleItems() as $item) {
56
+ $Product= Mage::getModel('catalog/product')->load($item->getProductId());
57
+ $type = self::sceauCategoryOf($Product);
58
+ //en préparation pour les prochains devs
59
+ //$type = (!self::sceauCategoryOf($Product)) ? $categories[0] : self::sceauCategoryOf($Product);
60
+
61
+ $EntityId = $Product->getEntityId();
62
+ $amount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount() + $item->getBaseTaxAmount() + $item->getBaseWeeeTaxAppliedRowAmount();
63
+ $pName = $item->getName();
64
+ if ($item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
65
+ $childrenProduct = $item->getChildrenItems();
66
+ if (count($childrenProduct) == 1) {
67
+ $pName = $childrenProduct[0]->getName();
68
+ }
69
+ }
70
+ $xml .= '<produit>';
71
+ $xml .= '<id><![CDATA[' . $EntityId . ']]></id>';
72
+ $xml .= '<categorie><![CDATA[' . $type . ']]></categorie>';
73
+ $xml .= '<libelle><![CDATA[' . Mage::Helper('fianet_sceau/Data')->clean_invalid_char($pName) . ']]></libelle>';
74
+ $xml .= '<montant><![CDATA[' . number_format($amount, 2, '.', '') . ']]></montant>';
75
+ try {
76
+ if ($Product->getImageUrl())
77
+ $xml .= '<image><![CDATA[' . $Product->getImageUrl() . ']]></image>';
78
+ } catch (Exception $e) {
79
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s Exception error: %s.', $order->getIncrementId(), $e->getMessage()));
80
+ }
81
+ $xml .= '</produit>';
82
+ }
83
+ $xml .= '</produits>';
84
+ } catch (Exception $e) {
85
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s Exception error: %s.', $order->getIncrementId(), $e->getMessage()));
86
+ }
87
+ }
88
+
89
+ $xml .= '</infocommande>';
90
+ $xml .= '<crypt><![CDATA[' . $crypt . ']]></crypt>';
91
+ $xml .= "</control>";
92
+
93
+ $xml = Mage::Helper('fianet_sceau/Data')->clean_xml($xml);
94
+
95
+ return $xml;
96
+ }
97
+
98
+ private static function sceauCategoryOf(Mage_Catalog_Model_Product $Product) {
99
+ $categoriesAssociations = Mage::getModel('sceau/categories_association');
100
+ $type = $categoriesAssociations
101
+ ->getCollection()
102
+ ->addFieldToFilter($categoriesAssociations->getIdFieldName(), array(
103
+ 'in' => $Product->getCategoryIds()
104
+ ))
105
+ ->getFirstItem()
106
+ ->getFianetSceauCategoryType();
107
+
108
+ return $type;
109
+ }
110
+ }
app/code/community/Fianet/Sceau/Model/Fianet/Productsreviews.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_Model_Fianet_Productsreviews {
3
+ public function dataProcessing($produitID, $reviewsArray, $state) {
4
+ try {
5
+ $text = "";
6
+ // Traitement particulier en fonction du retour de State
7
+ switch ($state) {
8
+ case 1 :
9
+ // Nouveaux avis produits
10
+ $text = $this->_addProductsReviews($produitID, $reviewsArray);
11
+ break;
12
+ case 2 :
13
+ // Avis produits modérés
14
+ $text = $this->_updateProductsReviews($produitID, $reviewsArray);
15
+ break;
16
+ case 3 :
17
+ // Avis produits supprimés
18
+ $text = $this->_deleteProductsReviews($produitID, $reviewsArray);
19
+ break;
20
+ default :
21
+ // Retour non attendu
22
+ Mage::throwException('State value not recognized.');
23
+ break;
24
+ }
25
+ return $text;
26
+ } catch (Exception $e) {
27
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Sceau: %s.', $e->getMessage()));
28
+ }
29
+ }
30
+
31
+ protected function _addProductsReviews($produitID, $reviewsArray) {
32
+ $text = "";
33
+ foreach ($reviewsArray as $productReview) {
34
+ // Véfication en base de données que l'avis n'a pas déjà été ajouté
35
+ $productsReview = Mage::getModel('sceau/avisproduits_commentaires')->load($productReview['id']);
36
+ if (!$productsReview->getReviewId()) {// Ajout si l'avis n'est pas présent
37
+ Mage::getModel('sceau/avisproduits_commentaires')
38
+ ->setReviewId($productReview['id'])
39
+ ->setProductId($productReview['produitid'])
40
+ ->setDate($productReview['date'])
41
+ ->setFirstName($productReview['prenom'])
42
+ ->setLastName($productReview['nom'])
43
+ ->setComment($productReview['commentaire'])
44
+ ->setNote($productReview['note'])
45
+ ->save();
46
+ Mage::getModel('sceau/avisproduits')
47
+ ->setProductId($productReview['produitid'])
48
+ ->setGlobalNote($productReview['noteglobale'])
49
+ ->setNumberReviews($productReview['nbravis'])
50
+ ->save();
51
+ if ($text != "") $text .= "\r\n";
52
+ $text .= "IDAvis " . $productReview['id'] . " ajouté pour le produit ".$productReview['produitid'];
53
+ }
54
+
55
+ /* // Décommenter cette partie pour ajouter les avis reçus dans le module Products Review Magento
56
+ // Modifier $rating_id en fonction de vos informations contenues dans la table rating_title
57
+ $rating_id = 1;
58
+ $storeid = Mage::getModel('fianet/functions')->getStore();
59
+
60
+ $review = Mage::getModel('review/review');
61
+ $review->setEntityPkValue($productReview['produitid']);
62
+ $review->setStatusId(1);
63
+ $review->setTitle("Avis récolté par FIA-NET");
64
+ $review->setDetail($productReview['commentaire']);
65
+ $review->setEntityId($review->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE));
66
+ $review->setStoreId($storeid);
67
+ $review->setStatusId(2); //Pending
68
+ $review->setCustomerId(null);//null is for administrator
69
+ $review->setNickname($productReview['prenom'] . " " . $productReview['nom']);
70
+ $review->setStores(array($storeid));
71
+ $review->save();
72
+
73
+ $rating_options = array ($rating_id => ceil($productReview['note']));
74
+
75
+ foreach($rating_options as $key1=>$val1) {
76
+ $_rating = Mage::getModel('rating/rating')
77
+ ->setRatingId($key1)
78
+ ->setReviewId($review->getId())
79
+ ->addOptionVote($val1,$productReview['produitid']);
80
+ }
81
+ $review->aggregate();
82
+ */
83
+ }
84
+ return $text;
85
+ }
86
+
87
+ protected function _updateProductsReviews($produitID, $reviewsArray) {
88
+ //fonctionnalité non disponible pour le moment.
89
+ $text = "";
90
+ foreach ($reviewsArray as $productReview) {
91
+ // Vérification en base de données que l'avis soit bien présent
92
+ $productsReview = Mage::getModel('sceau/avisproduits_commentaires')->load($productReview['id']);
93
+ if ($productsReview->getReviewId()) {// Modification si l'avis est présent
94
+ Mage::getModel('sceau/avisproduits_commentaires')
95
+ ->setReviewId($productReview['id'])
96
+ ->setProductId($productReview['produitid'])
97
+ ->setDate($productReview['date'])
98
+ ->setFirstName($productReview['prenom'])
99
+ ->setLastName($productReview['nom'])
100
+ ->setComment($productReview['commentaire'])
101
+ ->setNote($productReview['note'])
102
+ ->save();
103
+ Mage::getModel('sceau/avisproduits')
104
+ ->setProductId($productReview['produitid'])
105
+ ->setGlobalNote($productReview['noteglobale'])
106
+ ->setNumberReviews($productReview['nbravis'])
107
+ ->save();
108
+ if ($text != "") $text .= "\r\n";
109
+ $text .= "IDAvis " . $productReview['id'] . " modifié pour le produit ".$productReview['produitid'];
110
+ }
111
+ }
112
+ return $text;
113
+ }
114
+
115
+ protected function _deleteProductsReviews($produitID, $reviewsArray) {
116
+ $text = "";
117
+ foreach ($reviewsArray as $productReview) {
118
+ // Vérification en base de données que l'avis n'a pas déjà été supprimé
119
+ $productsReview = Mage::getModel('sceau/avisproduits_commentaires')->load($productReview['id']);
120
+ if ($productsReview->getReviewId()) {// Suppression si l'avis est présent
121
+ Mage::getModel('sceau/avisproduits_commentaires')
122
+ ->load($productReview['id'])
123
+ ->delete();
124
+ Mage::getModel('sceau/avisproduits')
125
+ ->setProductId($productReview['produitid'])
126
+ ->setGlobalNote($productReview['noteglobale'])
127
+ ->setNumberReviews($productReview['nbravis'])
128
+ ->save();
129
+ if ($text != "") $text .= "\r\n";
130
+ $text .= "IDAvis " . $productReview['id'] . " supprimé pour le produit ".$productReview['produitid'];
131
+ }
132
+ }
133
+ return $text;
134
+ }
135
+ }
app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_Model_Mysql4_Avisproduits extends Fianet_Core_Model_Mysql4_Abstract {
3
+ protected function _construct() {
4
+ $this->_init('sceau/avisproduits', 'product_id');
5
+ }
6
+ }
app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits/Collection.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_Model_Mysql4_Avisproduits_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
3
+ protected function _construct() {
4
+ parent::_construct();
5
+ $this->_init('sceau/avisproduits');
6
+ }
7
+ }
app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits/Commentaires.php ADDED
@@ -0,0 +1 @@
 
0
  protected function _construct() {
1
  $this->_init('sceau/avisproduits_commentaires', 'review_id');
2
  }
1
+ <?php
2
  protected function _construct() {
3
  $this->_init('sceau/avisproduits_commentaires', 'review_id');
4
  }
app/code/community/Fianet/Sceau/Model/Mysql4/Avisproduits/Commentaires/Collection.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_Model_Mysql4_Avisproduits_Commentaires_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
3
+ protected function _construct() {
4
+ parent::_construct();
5
+ $this->_init('sceau/avisproduits_commentaires');
6
+ }
7
+ }
app/code/community/Fianet/Sceau/Model/Observer.php CHANGED
@@ -18,7 +18,7 @@ class Fianet_Sceau_Model_Observer extends Varien_Event_Observer {
18
  'width' => '20',
19
  'renderer' => 'Fianet_Sceau_Block_Widget_grid_column_renderer_fianet',
20
  'filter' => 'Fianet_Sceau_Block_Widget_grid_column_filter_fianet'
21
- ), 'action');
22
  }
23
 
24
  if (preg_match('/' . self::MASSACTION_BLOCK_NAME_IN_LAYOUT . '[0-9]+/', $block->getNameInLayout())
@@ -35,26 +35,31 @@ class Fianet_Sceau_Model_Observer extends Varien_Event_Observer {
35
  $event = $observer->getEvent();
36
  $order = $event->getData('order');
37
 
38
- if ($this->_canSendOrder($order) && Mage::Helper('fianet_sceau/Data')->processOrderToFianet($order)) {
39
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s sent.', $order->getIncrementId()));
40
- Mage::getSingleton('adminhtml/session')->addSuccess('Commande #' . $order->getIncrementId() . ' envoyée à FIA-NET');
41
- }
 
 
 
 
 
 
 
 
 
 
42
  }
43
 
44
- protected function _canSendOrder(Mage_Sales_Model_Order $order)
45
- {
46
  if (!Mage::Helper('fianet_sceau/Data')->isModuleActive($order)) {//si le module est désactivé
47
  return false;
48
- }
49
- else if (Mage::Helper('fianet_sceau/Data')->isOrderAlreadySent($order)) {//Si la commande a déjà été envoyée
50
  return false;
51
- }
52
- elseif (Mage::Helper('fianet_sceau/Data')->checkCurrentOrderStatus($order)) {//si la status de la commande est l'un des status pour lequel l'envoi est requis
53
  return true;
54
- }
55
- elseif ($order->getState() == Mage_Sales_Model_Order::STATE_NEW && $order->getIsInProcess()) {//si la commande a été payée
56
  return true;
57
-
58
  }
59
  return false;
60
  }
18
  'width' => '20',
19
  'renderer' => 'Fianet_Sceau_Block_Widget_grid_column_renderer_fianet',
20
  'filter' => 'Fianet_Sceau_Block_Widget_grid_column_filter_fianet'
21
+ ), 'action');
22
  }
23
 
24
  if (preg_match('/' . self::MASSACTION_BLOCK_NAME_IN_LAYOUT . '[0-9]+/', $block->getNameInLayout())
35
  $event = $observer->getEvent();
36
  $order = $event->getData('order');
37
 
38
+ if ($this->_canSendOrder($order)) {
39
+ try {
40
+ //génération du flux XML
41
+ $sceauXML = Mage::getModel('sceau/fianet_order_sceau')->generateSceauXML($order);
42
+ //envoi du flux XML
43
+ $result = Mage::getModel('fianet/fianet_sender')->sendToSceau($order, $sceauXML);
44
+ //mise à jour des informations de la commande
45
+ Mage::Helper('fianet_sceau/Data')->processResponse($order, $result);
46
+ if ($result)
47
+ Mage::getSingleton('adminhtml/session')->addSuccess('Commande #' . $order->getIncrementId() . ' envoyée à FIA-NET');
48
+ } catch (Exception $e) {
49
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
50
+ }
51
+ }
52
  }
53
 
54
+ protected function _canSendOrder(Mage_Sales_Model_Order $order) {
 
55
  if (!Mage::Helper('fianet_sceau/Data')->isModuleActive($order)) {//si le module est désactivé
56
  return false;
57
+ } else if (Mage::Helper('fianet_sceau/Data')->isOrderAlreadySent($order)) {//Si la commande a déjà été envoyée
 
58
  return false;
59
+ } elseif (Mage::Helper('fianet_sceau/Data')->checkCurrentOrderStatus($order)) {//si la status de la commande est l'un des status pour lequel l'envoi est requis
 
60
  return true;
61
+ } elseif ($order->getState() == Mage_Sales_Model_Order::STATE_NEW && $order->getIsInProcess()) {//si la commande a été payée
 
62
  return true;
 
63
  }
64
  return false;
65
  }
app/code/community/Fianet/Sceau/Model/Order.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- class Fianet_Sceau_Model_Order
4
- {
5
- static function processOrderToFianet($order)
6
- {
7
- if (Fianet_Sceau_Helper_Data::sendOrderToFianet($this))
8
- {
9
- $attribut_sceau = Fianet_Sceau_Helper_Data::ORDER_ATTR_SCEAU_SENT_PPROD;
10
-
11
- if (Fianet_Sceau_Helper_Data::sendingMode($this) == Fianet_Sceau_Model_Source_Mode::MODE_PROD) {
12
- $attribut_sceau = Fianet_Sceau_Helper_Data::ORDER_ATTR_SCEAU_SENT_PROD;
13
- }
14
- $this->setData($attribut_sceau, '1');
15
- $this->save();
16
- return true;
17
- }
18
- return false;
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Fianet/Sceau/Model/Source/Language.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_Model_Source_Language {
3
+ public function toOptionArray() {
4
+ return array(
5
+ array('value' => 'fr', 'label' => Mage::helper('fianet')->__('French')),
6
+ array('value' => 'uk', 'label' => Mage::helper('fianet')->__('English')),
7
+ array('value' => 'es', 'label' => Mage::helper('fianet')->__('Spanish')),
8
+ array('value' => 'de', 'label' => Mage::helper('fianet')->__('German')),
9
+ );
10
+ }
11
+ }
app/code/community/Fianet/Sceau/Model/Source/Mode.php CHANGED
@@ -1,20 +1,4 @@
1
  <?php
2
-
3
- /**
4
- * 2000-2012 FIA-NET
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0) that is available
9
- * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
- * If you are unable to obtain it through the world-wide-web, please contact us
11
- * via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
12
- *
13
- * @author Quadra Informatique <ecommerce@quadra-informatique.fr>
14
- * @copyright 2000-2012 FIA-NET
15
- * @version Release: $Revision: 0.2.0 $
16
- * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
- */
18
  class Fianet_Sceau_Model_Source_Mode {
19
 
20
  const MODE_PROD = 'prod';
@@ -26,5 +10,4 @@ class Fianet_Sceau_Model_Source_Mode {
26
  array('value' => self::MODE_PROD, 'label' => Mage::helper('adminhtml')->__('Production')),
27
  );
28
  }
29
-
30
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  class Fianet_Sceau_Model_Source_Mode {
3
 
4
  const MODE_PROD = 'prod';
10
  array('value' => self::MODE_PROD, 'label' => Mage::helper('adminhtml')->__('Production')),
11
  );
12
  }
 
13
  }
app/code/community/Fianet/Sceau/Model/Source/Pagination.php ADDED
@@ -0,0 +1 @@
 
0
  public function toOptionArray() {
1
  return array(
2
  array('value' => '4', 'label' => '4'),
3
  array('value' => '8', 'label' => '8'),
4
  );
5
  }
1
+ <?php
2
  public function toOptionArray() {
3
  return array(
4
  array('value' => '4', 'label' => '4'),
5
  array('value' => '8', 'label' => '8'),
6
  );
7
  }
app/code/community/Fianet/Sceau/Model/Source/Status.php CHANGED
@@ -8,16 +8,13 @@
8
  class Fianet_Sceau_Model_Source_Status
9
  {
10
  public static function toOptionArray() {
11
- $statuses = Mage::getModel('sales/order_status')->getCollection()->load();
12
 
13
  $data = array();
14
 
15
- foreach ($statuses as $status)
16
- {
17
- $data[] = array('label' => $status->getLabel(), 'value' => $status->getStatus());
18
- }
19
-
20
-
21
 
22
  return $data;
23
  }
8
  class Fianet_Sceau_Model_Source_Status
9
  {
10
  public static function toOptionArray() {
11
+ $statuses = Mage::getSingleton('sales/order_config')->getStatuses();
12
 
13
  $data = array();
14
 
15
+ foreach ($statuses as $code => $label) {
16
+ $data[] = array('label' => $label, 'value' => $code);
17
+ }
 
 
 
18
 
19
  return $data;
20
  }
app/code/community/Fianet/Sceau/controllers/Adminhtml/CategoriesController.php.old ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Fianet_Sceau_Adminhtml_CategoriesController extends Mage_Adminhtml_Controller_Action {
4
+ public function indexAction() {
5
+ $this->loadLayout();
6
+ $this->_setActiveMenu('adminfianet');
7
+ $this->getLayout()->getBlock('head')->setTitle(Mage::helper('fianet')->__('Categories type'));
8
+ $this->renderLayout();
9
+ }
10
+
11
+ public function postAction() {
12
+ $post = $this->getRequest()->getPost();
13
+ try {
14
+ if (empty($post)) {
15
+ Mage::throwException($this->__('Sceau: Invalid form data.'));
16
+ }
17
+ foreach ($post as $Code => $data) {
18
+ if (($data['categoryType'] && $data['productType']) && $Code != "form_key") {
19
+ Mage::getModel('sceau/categories_association')
20
+ ->load($Code)
21
+ ->setEntityId($Code)
22
+ ->setFianetSceauCategoryType($data['productType'])
23
+ ->save();
24
+ }
25
+ }
26
+ Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Data successfully saved.'));
27
+
28
+ } catch (Exception $e) {
29
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
30
+ }
31
+ $this->_redirect('*/*');
32
+ }
33
+ }
app/code/community/Fianet/Sceau/controllers/Adminhtml/ProductsController.php CHANGED
@@ -29,7 +29,7 @@ class Fianet_Sceau_Adminhtml_ProductsController extends Mage_Adminhtml_Controlle
29
  ->save();
30
  }
31
  }
32
- Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Data succesfully saved.'));
33
  } catch (Exception $e) {
34
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
35
  }
29
  ->save();
30
  }
31
  }
32
+ Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Data successfully saved.'));
33
  } catch (Exception $e) {
34
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
35
  }
app/code/community/Fianet/Sceau/controllers/Adminhtml/ShippingController.php CHANGED
@@ -25,7 +25,7 @@ class Fianet_Sceau_Adminhtml_ShippingController extends Mage_Adminhtml_Controlle
25
  ->save();
26
  }
27
  }
28
- Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Data succesfully saved.'));
29
  } catch (Exception $e) {
30
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
31
  }
25
  ->save();
26
  }
27
  }
28
+ Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Data successfully saved.'));
29
  } catch (Exception $e) {
30
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
31
  }
app/code/community/Fianet/Sceau/controllers/IndexController.php CHANGED
@@ -4,34 +4,31 @@ class Fianet_Sceau_IndexController extends Mage_Adminhtml_Controller_Action {
4
  public function massAction() {
5
  $params = Mage::app()->getRequest()->getParams();
6
  $orderIds = $params[$params['massaction_prepare_key']];
7
-
8
  $successMsg = '';
9
-
10
  foreach ($orderIds as $orderId) {
11
  $order = Mage::getModel('sales/order')->load($orderId);
12
-
13
- if ( $this->_canSendOrder($order) && Mage::Helper('fianet_sceau/Data')->processOrderToFianet($order)) {
14
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s sent.', $order->getIncrementId()));
15
- $successMsg .= "\n<br />- Commande #" . $order->getIncrementId();
 
 
 
 
 
 
 
 
 
 
16
  }
17
- $order->save();
18
  }
 
19
  if ($successMsg != '') {
20
  $successMsg = 'Commande(s) envoyée(s) à FIA-NET :' . $successMsg;
21
  Mage::getSingleton('adminhtml/session')->addSuccess($successMsg);
22
  }
23
  $this->_redirect('adminhtml/sales_order/index');
24
  }
25
-
26
- protected function _canSendOrder(Mage_Sales_Model_Order $order) {
27
- if (!Mage::Helper('fianet_sceau/Data')->isModuleActive($order)) {//si le module est désactivé
28
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: module disabled, order #%s not sent.', $order->getIncrementId()));
29
- return false;
30
- }
31
- else if (Mage::Helper('fianet_sceau/Data')->isOrderAlreadySent($order)) {//Si la commande a déjà été envoyée
32
- Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau: order #%s already sent.', $order->getIncrementId()));
33
- return false;
34
- }
35
- return true;
36
- }
37
  }
4
  public function massAction() {
5
  $params = Mage::app()->getRequest()->getParams();
6
  $orderIds = $params[$params['massaction_prepare_key']];
7
+
8
  $successMsg = '';
 
9
  foreach ($orderIds as $orderId) {
10
  $order = Mage::getModel('sales/order')->load($orderId);
11
+ if (Mage::Helper('fianet_sceau/Data')->canSendOrder($order)) {
12
+ try {
13
+ //génération du flux XML
14
+ $sceauXML = Mage::getModel('sceau/fianet_order_sceau')->generateSceauXML($order);
15
+ //envoi du flux XML
16
+ $result = Mage::getModel('fianet/fianet_sender')->sendToSceau($order, $sceauXML);
17
+ //mise à jour des informations de la commande
18
+ Mage::Helper('fianet_sceau/Data')->processResponse($order, $result);
19
+
20
+ if ($result)
21
+ $successMsg .= "\n<br />- Commande #" . $order->getIncrementId();
22
+ } catch (Exception $e) {
23
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
24
+ }
25
  }
 
26
  }
27
+
28
  if ($successMsg != '') {
29
  $successMsg = 'Commande(s) envoyée(s) à FIA-NET :' . $successMsg;
30
  Mage::getSingleton('adminhtml/session')->addSuccess($successMsg);
31
  }
32
  $this->_redirect('adminhtml/sales_order/index');
33
  }
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
app/code/community/Fianet/Sceau/controllers/ProductsreviewsController.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Fianet_Sceau_ProductsreviewsController extends Mage_Core_Controller_Front_Action {
3
+ public function saveAction() {
4
+ $post = $this->getRequest()->getPost();
5
+ $store = Mage::getModel('fianet/functions')->getStore();
6
+ $fianetData = array();
7
+
8
+ try {
9
+ $fianetData['SiteID'] = $post['SiteID'];
10
+ $fianetData['ProduitID'] = $post['RefProduit'];
11
+ $fianetData['XMLAvis'] = $post['XMLAvis'];
12
+ $fianetData['State'] = $post['State'];
13
+ $fianetData['HashControl'] = $post['HashControl'];
14
+
15
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau ref produit: %s.', $fianetData['ProduitID']));
16
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau avisproduits: %s.', $fianetData['XMLAvis']));
17
+
18
+ // On verifie que les données proviennent bien du Sceau de Confiance
19
+ $cryptKey = Mage::getStoreConfig('sceau/sceauconfg/private_key', $store);
20
+ if ($cryptKey == '' && $store > 0) {
21
+ $cryptKey = Mage::getStoreConfig('sceau/sceauconfg/private_key', '0');
22
+ }
23
+
24
+ $verificationHash = MD5($fianetData['SiteID'] . "+" . $cryptKey . "-" . $fianetData['ProduitID']);
25
+ if ($verificationHash != $fianetData['HashControl']) {// Si non on arrète tout
26
+ Mage::throwException('Hash value doesn\'t according to Merchant.');
27
+ }
28
+
29
+ // On parse le flux XML pour en récupérer un tableau
30
+ $reviewsArray = Mage::getModel('fianet/fianet_parser')->parseXMLAvis($fianetData['XMLAvis']);
31
+
32
+ // On met à jour la table des avis produits
33
+ $return = Mage::getModel('sceau/fianet_productsreviews')->dataProcessing($fianetData['ProduitID'], $reviewsArray, $fianetData['State']);
34
+ Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__('Sceau avisproduits: %s.', $return));
35
+
36
+ $this->_redirect('');
37
+ } catch (Exception $e) {
38
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Sceau: %s.', $e->getMessage()));
39
+ }
40
+ }
41
+ }
app/code/community/Fianet/Sceau/etc/adminhtml.xml CHANGED
@@ -7,7 +7,7 @@
7
  <sort_order>10</sort_order>
8
  <children>
9
  <sceaucategorytype translate="title" module="fianet_sceau">
10
- <title>Product types: global configuration by category</title>
11
  <sort_order>10</sort_order>
12
  <action>sceau/adminhtml_categories</action>
13
  </sceaucategorytype>
@@ -54,7 +54,7 @@
54
  <sort_order>10</sort_order>
55
  <children>
56
  <sceaucategorytype>
57
- <title>Product types: global configuration by category</title>
58
  <sort_order>10</sort_order>
59
  </sceaucategorytype>
60
  <!--<sceauproducttype>
7
  <sort_order>10</sort_order>
8
  <children>
9
  <sceaucategorytype translate="title" module="fianet_sceau">
10
+ <title>Product types configuration by category</title>
11
  <sort_order>10</sort_order>
12
  <action>sceau/adminhtml_categories</action>
13
  </sceaucategorytype>
54
  <sort_order>10</sort_order>
55
  <children>
56
  <sceaucategorytype>
57
+ <title>Product types configuration by category</title>
58
  <sort_order>10</sort_order>
59
  </sceaucategorytype>
60
  <!--<sceauproducttype>
app/code/community/Fianet/Sceau/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Fianet_Sceau>
5
- <version>1.0.4</version>
6
  </Fianet_Sceau>
7
  </modules>
8
  <global>
@@ -30,6 +30,12 @@
30
  <categories_association>
31
  <table>fianet_sceau_catProducts_association</table>
32
  </categories_association>
 
 
 
 
 
 
33
  </entities>
34
  </fianet_sceau_mysql4>
35
  </models>
@@ -56,7 +62,7 @@
56
  </fianet_sceau_read>
57
  </resources>
58
  <events>
59
- <sales_order_save_before>
60
  <observers>
61
  <Fianet_Sceau_Model_Observer_1>
62
  <type>singleton</type>
@@ -64,36 +70,34 @@
64
  <method>sendToFianet</method>
65
  </Fianet_Sceau_Model_Observer_1>
66
  </observers>
67
- </sales_order_save_before>
68
  </events>
69
  </global>
70
  <default>
71
  <sceau>
72
  <sceauconfg>
73
  <orderstatuses>processing</orderstatuses>
 
74
  </sceauconfg>
 
 
 
 
 
75
  <widgetconf>
76
- <active><![CDATA[1]]>
77
- </active>
78
- <left_position><![CDATA[1]]>
79
- </left_position>
80
- <right_position><![CDATA[1]]>
81
- </right_position>
82
- <footer_position><![CDATA[1]]>
83
- </footer_position>
84
  </widgetconf>
85
  <logoconf>
86
- <active><![CDATA[1]]>
87
- </active>
88
- <logo_left_position><![CDATA[1]]>
89
- </logo_left_position>
90
- <logo_right_position><![CDATA[1]]>
91
- </logo_right_position>
92
- <logo_footer_position><![CDATA[1]]>
93
- </logo_footer_position>
94
  </logoconf>
95
  <url>
96
- <url_extranet><![CDATA[https://www.fia-net.com/__extranet/]]></url_extranet>
97
  </url>
98
  <sceaulinks>
99
  <fianet_url><![CDATA[https://www.fia-net.com]]></fianet_url>
@@ -140,6 +144,13 @@
140
  </updates>
141
  </layout>
142
  <routers>
 
 
 
 
 
 
 
143
  </routers>
144
  </frontend>
145
  <admin>
2
  <config>
3
  <modules>
4
  <Fianet_Sceau>
5
+ <version>1.1.0</version>
6
  </Fianet_Sceau>
7
  </modules>
8
  <global>
30
  <categories_association>
31
  <table>fianet_sceau_catProducts_association</table>
32
  </categories_association>
33
+ <avisproduits>
34
+ <table>fianet_sceau_avis_produits</table>
35
+ </avisproduits>
36
+ <avisproduits_commentaires>
37
+ <table>fianet_sceau_commentaires_avis_produits</table>
38
+ </avisproduits_commentaires>
39
  </entities>
40
  </fianet_sceau_mysql4>
41
  </models>
62
  </fianet_sceau_read>
63
  </resources>
64
  <events>
65
+ <sales_order_save_after>
66
  <observers>
67
  <Fianet_Sceau_Model_Observer_1>
68
  <type>singleton</type>
70
  <method>sendToFianet</method>
71
  </Fianet_Sceau_Model_Observer_1>
72
  </observers>
73
+ </sales_order_save_after>
74
  </events>
75
  </global>
76
  <default>
77
  <sceau>
78
  <sceauconfg>
79
  <orderstatuses>processing</orderstatuses>
80
+ <language>fr</language>
81
  </sceauconfg>
82
+ <productsreviewsconf>
83
+ <active>1</active>
84
+ <activedisplay>0</activedisplay>
85
+ <numberpagination>8</numberpagination>
86
+ </productsreviewsconf>
87
  <widgetconf>
88
+ <active>1></active>
89
+ <left_position>1</left_position>
90
+ <right_position>1</right_position>
91
+ <footer_position>1</footer_position>
 
 
 
 
92
  </widgetconf>
93
  <logoconf>
94
+ <active>1</active>
95
+ <logo_left_position>1</logo_left_position>
96
+ <logo_right_position>1</logo_right_position>
97
+ <logo_footer_position>1</logo_footer_position>
 
 
 
 
98
  </logoconf>
99
  <url>
100
+ <url_extranet><![CDATA[https://www.fia-net.com/__extranet/]]></url_extranet>
101
  </url>
102
  <sceaulinks>
103
  <fianet_url><![CDATA[https://www.fia-net.com]]></fianet_url>
144
  </updates>
145
  </layout>
146
  <routers>
147
+ <fianetsceau>
148
+ <use>standard</use>
149
+ <args>
150
+ <module>Fianet_Sceau</module>
151
+ <frontName>sceau</frontName>
152
+ </args>
153
+ </fianetsceau>
154
  </routers>
155
  </frontend>
156
  <admin>
app/code/community/Fianet/Sceau/etc/system.xml CHANGED
@@ -2,8 +2,8 @@
2
  <config>
3
  <sections>
4
  <sceau translate="label">
5
- <label>Sceau de confiance</label>
6
- <tab>sales</tab>
7
  <frontend_type>text</frontend_type>
8
  <sort_order>1500</sort_order>
9
  <show_in_default>1</show_in_default>
@@ -20,7 +20,6 @@
20
  <show_in_store>1</show_in_store>
21
  <fields>
22
  <!-- New fields go here -->
23
-
24
  <active translate="label">
25
  <label>Enabled</label>
26
  <frontend_type>select</frontend_type>
@@ -33,30 +32,29 @@
33
  <mode translate="label">
34
  <label>Mode</label>
35
  <frontend_type>select</frontend_type>
36
- <source_model>fianet_sceau_model_source_mode</source_model>
37
  <sort_order>2</sort_order>
38
  <show_in_default>1</show_in_default>
39
  <show_in_website>1</show_in_website>
40
  <show_in_store>1</show_in_store>
41
  </mode>
42
- <siteid translate="label comment">
43
  <label>Site ID</label>
44
  <frontend_type>text</frontend_type>
45
  <sort_order>3</sort_order>
46
  <show_in_default>1</show_in_default>
47
  <show_in_website>1</show_in_website>
48
  <show_in_store>1</show_in_store>
49
- <comment>Correspond à votre identifiant marchand FIA-NET</comment>
50
  </siteid>
51
  <login translate="label">
52
- <label>Login</label>
53
  <frontend_type>text</frontend_type>
54
  <sort_order>4</sort_order>
55
  <show_in_default>1</show_in_default>
56
  <show_in_website>1</show_in_website>
57
  <show_in_store>1</show_in_store>
58
  </login>
59
- <password translate="label comment">
60
  <label>Password</label>
61
  <frontend_type>text</frontend_type>
62
  <sort_order>5</sort_order>
@@ -64,30 +62,94 @@
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>1</show_in_store>
66
  </password>
67
- <private_key translate="label comment">
68
  <label>Private key</label>
 
69
  <frontend_type>text</frontend_type>
70
  <sort_order>6</sort_order>
71
  <show_in_default>1</show_in_default>
72
  <show_in_website>1</show_in_website>
73
  <show_in_store>1</show_in_store>
74
  </private_key>
75
- <orderstatuses translate="label comment">
76
  <label>Automatic sending orders</label>
77
  <frontend_type>multiselect</frontend_type>
78
- <source_model>fianet_sceau_model_source_status</source_model>
79
- <sort_order>7</sort_order>
80
  <show_in_default>1</show_in_default>
81
  <show_in_website>0</show_in_website>
82
  <show_in_store>0</show_in_store>
83
  <comment>Select the status for which the transaction will be sent to Sceau de Confiance system (multiple selections possible)</comment>
84
  </orderstatuses>
 
 
 
 
 
 
 
 
 
85
  </fields>
86
  </sceauconfg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  <logoconf translate="label">
88
  <label>Logo configuration</label>
89
  <frontend_type>text</frontend_type>
90
- <sort_order>2</sort_order>
91
  <show_in_default>1</show_in_default>
92
  <show_in_website>1</show_in_website>
93
  <show_in_store>1</show_in_store>
@@ -124,7 +186,7 @@
124
  <widgetconf translate="label">
125
  <label>Widget configuration</label>
126
  <frontend_type>text</frontend_type>
127
- <sort_order>3</sort_order>
128
  <show_in_default>1</show_in_default>
129
  <show_in_website>1</show_in_website>
130
  <show_in_store>1</show_in_store>
@@ -157,7 +219,7 @@
157
  <show_in_store>1</show_in_store>
158
  </footer_position>
159
  <widgettransparent translate="label">
160
- <label>widget transparent</label>
161
  <frontend_type>select</frontend_type>
162
  <source_model>adminhtml/system_config_source_yesno</source_model>
163
  <sort_order>4</sort_order>
@@ -179,12 +241,12 @@
179
  <sceaulinks translate="label">
180
  <label>Links</label>
181
  <frontend_type>text</frontend_type>
182
- <sort_order>4</sort_order>
183
  <show_in_default>1</show_in_default>
184
  <show_in_website>1</show_in_website>
185
  <show_in_store>1</show_in_store>
186
  <fields>
187
- <fianet_url translate="label comment">
188
  <label>FIA-NET URL</label>
189
  <frontend_type>text</frontend_type>
190
  <sort_order>1</sort_order>
@@ -192,7 +254,7 @@
192
  <show_in_website>0</show_in_website>
193
  <show_in_store>0</show_in_store>
194
  </fianet_url>
195
- <test_send_url translate="label comment">
196
  <label>[TEST] Sending script's orders</label>
197
  <frontend_type>text</frontend_type>
198
  <sort_order>2</sort_order>
@@ -200,7 +262,7 @@
200
  <show_in_website>0</show_in_website>
201
  <show_in_store>0</show_in_store>
202
  </test_send_url>
203
- <prod_send_url translate="label comment">
204
  <label>[PROD] Sending script's orders</label>
205
  <frontend_type>text</frontend_type>
206
  <sort_order>3</sort_order>
2
  <config>
3
  <sections>
4
  <sceau translate="label">
5
+ <label>Sceau de Confiance</label>
6
+ <tab>fianet</tab>
7
  <frontend_type>text</frontend_type>
8
  <sort_order>1500</sort_order>
9
  <show_in_default>1</show_in_default>
20
  <show_in_store>1</show_in_store>
21
  <fields>
22
  <!-- New fields go here -->
 
23
  <active translate="label">
24
  <label>Enabled</label>
25
  <frontend_type>select</frontend_type>
32
  <mode translate="label">
33
  <label>Mode</label>
34
  <frontend_type>select</frontend_type>
35
+ <source_model>sceau/source_mode</source_model>
36
  <sort_order>2</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
39
  <show_in_store>1</show_in_store>
40
  </mode>
41
+ <siteid translate="label, comment">
42
  <label>Site ID</label>
43
  <frontend_type>text</frontend_type>
44
  <sort_order>3</sort_order>
45
  <show_in_default>1</show_in_default>
46
  <show_in_website>1</show_in_website>
47
  <show_in_store>1</show_in_store>
 
48
  </siteid>
49
  <login translate="label">
50
+ <label>FIA-NET Login</label>
51
  <frontend_type>text</frontend_type>
52
  <sort_order>4</sort_order>
53
  <show_in_default>1</show_in_default>
54
  <show_in_website>1</show_in_website>
55
  <show_in_store>1</show_in_store>
56
  </login>
57
+ <password translate="label, comment">
58
  <label>Password</label>
59
  <frontend_type>text</frontend_type>
60
  <sort_order>5</sort_order>
62
  <show_in_website>1</show_in_website>
63
  <show_in_store>1</show_in_store>
64
  </password>
65
+ <private_key translate="label, comment">
66
  <label>Private key</label>
67
+ <comment>Site ID, Login, Password and Private key are provided in your FIA-NET account</comment>
68
  <frontend_type>text</frontend_type>
69
  <sort_order>6</sort_order>
70
  <show_in_default>1</show_in_default>
71
  <show_in_website>1</show_in_website>
72
  <show_in_store>1</show_in_store>
73
  </private_key>
74
+ <orderstatuses translate="label, comment">
75
  <label>Automatic sending orders</label>
76
  <frontend_type>multiselect</frontend_type>
77
+ <source_model>sceau/source_status</source_model>
78
+ <sort_order>8</sort_order>
79
  <show_in_default>1</show_in_default>
80
  <show_in_website>0</show_in_website>
81
  <show_in_store>0</show_in_store>
82
  <comment>Select the status for which the transaction will be sent to Sceau de Confiance system (multiple selections possible)</comment>
83
  </orderstatuses>
84
+ <language translate="label">
85
+ <label>Questionnaires language</label>
86
+ <frontend_type>select</frontend_type>
87
+ <source_model>sceau/source_language</source_model>
88
+ <sort_order>9</sort_order>
89
+ <show_in_default>1</show_in_default>
90
+ <show_in_website>0</show_in_website>
91
+ <show_in_store>0</show_in_store>
92
+ </language>
93
  </fields>
94
  </sceauconfg>
95
+ <productsreviewsconf translate="label">
96
+ <label>Products Reviews configuration</label>
97
+ <frontend_type>text</frontend_type>
98
+ <sort_order>2</sort_order>
99
+ <show_in_default>1</show_in_default>
100
+ <show_in_website>1</show_in_website>
101
+ <show_in_store>1</show_in_store>
102
+ <fields>
103
+ <active translate="label, comment">
104
+ <label>Enable the feature</label>
105
+ <comment>Enable sending of product's questionnaires</comment>
106
+ <frontend_type>select</frontend_type>
107
+ <source_model>adminhtml/system_config_source_yesno</source_model>
108
+ <sort_order>1</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ </active>
113
+ <activedisplay translate="label, comment">
114
+ <label>Display of customer reviews about products</label>
115
+ <frontend_type>select</frontend_type>
116
+ <source_model>adminhtml/system_config_source_yesno</source_model>
117
+ <sort_order>2</sort_order>
118
+ <show_in_default>1</show_in_default>
119
+ <show_in_website>1</show_in_website>
120
+ <show_in_store>1</show_in_store>
121
+ </activedisplay>
122
+ <numberpagination translate="label, comment">
123
+ <label>Pagination</label>
124
+ <comment>Maximum number of reviews per page</comment>
125
+ <frontend_type>select</frontend_type>
126
+ <source_model>sceau/source_pagination</source_model>
127
+ <depends>
128
+ <activedisplay>1</activedisplay>
129
+ </depends>
130
+ <sort_order>3</sort_order>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>1</show_in_store>
134
+ </numberpagination>
135
+ <daysnotdisplay translate="label, comment">
136
+ <label>Maximum delay to display of reviews (in days)</label>
137
+ <comment>Not display reviews after [text] days. Leave blank to display all</comment>
138
+ <frontend_type>text</frontend_type>
139
+ <depends>
140
+ <activedisplay>1</activedisplay>
141
+ </depends>
142
+ <sort_order>4</sort_order>
143
+ <show_in_default>1</show_in_default>
144
+ <show_in_website>1</show_in_website>
145
+ <show_in_store>1</show_in_store>
146
+ </daysnotdisplay>
147
+ </fields>
148
+ </productsreviewsconf>
149
  <logoconf translate="label">
150
  <label>Logo configuration</label>
151
  <frontend_type>text</frontend_type>
152
+ <sort_order>3</sort_order>
153
  <show_in_default>1</show_in_default>
154
  <show_in_website>1</show_in_website>
155
  <show_in_store>1</show_in_store>
186
  <widgetconf translate="label">
187
  <label>Widget configuration</label>
188
  <frontend_type>text</frontend_type>
189
+ <sort_order>4</sort_order>
190
  <show_in_default>1</show_in_default>
191
  <show_in_website>1</show_in_website>
192
  <show_in_store>1</show_in_store>
219
  <show_in_store>1</show_in_store>
220
  </footer_position>
221
  <widgettransparent translate="label">
222
+ <label>Widget transparent</label>
223
  <frontend_type>select</frontend_type>
224
  <source_model>adminhtml/system_config_source_yesno</source_model>
225
  <sort_order>4</sort_order>
241
  <sceaulinks translate="label">
242
  <label>Links</label>
243
  <frontend_type>text</frontend_type>
244
+ <sort_order>5</sort_order>
245
  <show_in_default>1</show_in_default>
246
  <show_in_website>1</show_in_website>
247
  <show_in_store>1</show_in_store>
248
  <fields>
249
+ <fianet_url translate="label, comment">
250
  <label>FIA-NET URL</label>
251
  <frontend_type>text</frontend_type>
252
  <sort_order>1</sort_order>
254
  <show_in_website>0</show_in_website>
255
  <show_in_store>0</show_in_store>
256
  </fianet_url>
257
+ <test_send_url translate="label, comment">
258
  <label>[TEST] Sending script's orders</label>
259
  <frontend_type>text</frontend_type>
260
  <sort_order>2</sort_order>
262
  <show_in_website>0</show_in_website>
263
  <show_in_store>0</show_in_store>
264
  </test_send_url>
265
+ <prod_send_url translate="label, comment">
266
  <label>[PROD] Sending script's orders</label>
267
  <frontend_type>text</frontend_type>
268
  <sort_order>3</sort_order>
app/code/community/Fianet/Sceau/sql/fianet_sceau_setup/mysql4-upgrade-1.0.4-1.1.0.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php
app/design/adminhtml/default/default/template/fianet_sceau/products.phtml CHANGED
@@ -18,5 +18,5 @@ try {
18
  <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Products list'); ?></h4>
19
  <?php
20
  $ProductsType = Mage::getModel("sceau/source_ProductType")->toOptionArray();
21
- var_dump($ProductsType);
22
  ?>
18
  <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Products list'); ?></h4>
19
  <?php
20
  $ProductsType = Mage::getModel("sceau/source_ProductType")->toOptionArray();
21
+ //var_dump($ProductsType);
22
  ?>
app/design/frontend/base/default/layout/fianet_sceau.xml CHANGED
@@ -3,17 +3,17 @@
3
  <layout>
4
  <default>
5
  <reference name="left">
6
- <block type="fianet_sceau/widget_left" name="sceau.left" template="fianet_sceau/page/html/sceau.phtml" before="-" />
7
  </reference>
8
  <reference name="left">
9
- <block type="fianet_sceau/logo_left" name="logo.left" template="fianet_sceau/page/html/logo.phtml"/>
10
- </reference>
11
  <reference name="right">
12
- <block type="fianet_sceau/widget_right" name="sceau.right" template="fianet_sceau/page/html/sceau.phtml" before="-" />
13
  </reference>
14
  <reference name="right">
15
- <block type="fianet_sceau/logo_right" name="logo.right" template="fianet_sceau/page/html/logo.phtml" />
16
- </reference>
17
  <reference name="footer">
18
  <block type="fianet_sceau/widget_footer" name="sceau.footer" template="fianet_sceau/page/html/sceau.phtml" />
19
  </reference>
3
  <layout>
4
  <default>
5
  <reference name="left">
6
+ <block type="fianet_sceau/logo_left" name="logo.left" template="fianet_sceau/page/html/logo.phtml" before="-" />
7
  </reference>
8
  <reference name="left">
9
+ <block type="fianet_sceau/widget_left" name="sceau.left" template="fianet_sceau/page/html/sceau.phtml" before="-" />
10
+ </reference>
11
  <reference name="right">
12
+ <block type="fianet_sceau/logo_right" name="logo.right" template="fianet_sceau/page/html/logo.phtml" before="-" />
13
  </reference>
14
  <reference name="right">
15
+ <block type="fianet_sceau/widget_right" name="sceau.right" template="fianet_sceau/page/html/sceau.phtml" before="-" />
16
+ </reference>
17
  <reference name="footer">
18
  <block type="fianet_sceau/widget_footer" name="sceau.footer" template="fianet_sceau/page/html/sceau.phtml" />
19
  </reference>
app/design/frontend/base/default/template/fianet_sceau/page/html/logo.phtml CHANGED
@@ -1,9 +1,10 @@
1
  <?php if ($this->canDisplay()): ?>
2
-
3
- <a target="_blank" href="http://www.fia-net.com/annuaire/<?php echo Fianet_Sceau_Helper_Data::getSiteId(); ?>/<?php echo Fianet_Sceau_Helper_Data::getLogin(); ?>.html" >
4
- <center><img width="150px" src="<?php echo $this->getSkinUrl('images/sceau/logo_fianet_sceau.png') ?>">
5
- </center>
6
- </a>
7
-
8
-
9
- <?php endif; ?>
 
1
  <?php if ($this->canDisplay()): ?>
2
+ <div class="link">
3
+ <center>
4
+ <a target="_blank" href="http://www.fia-net.com/annuaire/<?php echo trim(Fianet_Sceau_Helper_Data::getSiteId()); ?>/<?php echo trim(Fianet_Sceau_Helper_Data::getLogin()); ?>.html" >
5
+ <img width="150px" src="<?php echo $this->getSkinUrl('images/sceau/logo_fianet_sceau.png') ?>">
6
+ </a>
7
+ </center>
8
+ </div>
9
+ <br />
10
+ <?php endif; ?>
app/design/frontend/base/default/template/fianet_sceau/page/html/productsReviews.phtml CHANGED
@@ -1,9 +1,65 @@
1
- <?php if ($this->isModuleActive()): ?>
2
- <!--<div class="main-container">
3
- <h2><?php echo $this->__('Customer reviews about products') ?></h2>
4
- <div>
5
- blabla
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  </div>
7
- </div>-->
8
- <?php endif; ?>
9
-
1
+ <?php
2
+ if ($this->isModuleActive() && $this->isProductsReviewsDisplayActive()):
3
+ $post = $this->getRequest()->getPost();
4
+
5
+ //récupération des infos courantes : identifiant produit, url de la page et numéro de page d'avis du produit
6
+ $productID = $this->getProduct()->getEntityId();
7
+ $numberPagination = Mage::getStoreConfig('sceau/productsreviewsconf/numberpagination');
8
+ $currentPage=isset($post['pageReviews']) ? $post['pageReviews'] : 1;
9
+
10
+ //récupération des infos globales d'avis du produit
11
+ $ProductReview = $this->getProductReview($productID);
12
+ //récupération des commentaires produit dans un tableau pour préparer la pagination
13
+ $commentsTab = $this->getTabProductReviewComments($productID);
14
+
15
+ //récupération du 1er ID commentaire à afficher et du nombre de pages
16
+ $firstIDToDisplay = $this->getFirstIDToDisplay($currentPage, $numberPagination);
17
+ $maxPage = $this->getMaxPage(count($commentsTab), $numberPagination); ?>
18
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl(); ?>fianet/sceau.js"></script>
19
+ <link rel="stylesheet" href="<?php echo $this->getSkinUrl(); ?>fianet/sceau.css" type="text/css" />
20
+ <div id="productsreviews-view">
21
+ <div id="productsreviews-head">
22
+ <div id="fianet-logo">
23
+ <div class="title-logo">Avis r&eacute;colt&eacute;s par</div>
24
+ <img src="<?php echo $this->getSkinUrl('images/sceau/logo-fianet-transparent.png') ?>" height="32" width="125"/>
25
+ </div>
26
+
27
+ <?php if (count($commentsTab) == 0) : ?>
28
+ <div id="comment-note">
29
+ Aucun<br /> avis<br /> post&eacute;<br /> &agrave; ce jour
30
+ </div>
31
+ <div id="global-note">
32
+ <div class="title-note2">Note globale</div>
33
+ <img src="<?php echo $this->getSkinUrl('images/sceau/ncstar.png') ?>"/>
34
+ </div>
35
+ <?php else : ?>
36
+ <div id="product-note">
37
+ <?php echo $this->getNote($ProductReview->getGlobalNote()) ?>/5
38
+ </div>
39
+ <div id="global-note">
40
+ <div class="title-note">Note globale</div>
41
+ <img src="<?php echo $this->getSkinUrl('images/sceau/' . $this->getCalculatedNote($ProductReview->getGlobalNote()) . 'star.png') ?>"/>
42
+ <p>sur <b><?php echo $ProductReview->getNumberReviews() ?></b> avis</p>
43
+ </div>
44
+ <?php endif; ?>
45
+ </div>
46
+
47
+ <?php if (count($commentsTab) > 0) : ?>
48
+ <div id="border"></div>
49
+ <div id="productsreviews-tab">
50
+ <?php $id = $firstIDToDisplay;
51
+ while (($id < $firstIDToDisplay + $numberPagination) && ($commentsTab[$id]['review_id'])) :?>
52
+ <div class="head1"><img src="<?php echo $this->getSkinUrl('images/sceau/' . $this->getCalculatedNote($commentsTab[$id]['note']) . 'star.png') ?>" height="14" width="76"></div>
53
+ <div class="head2">Par <?php echo $commentsTab[$id]['first_name'] . " " . $commentsTab[$id]['last_name'] ?></div>
54
+ <div class="head3"><?php echo $this->getStrDate(new DateTime($commentsTab[$id]['date'])) ?></div>
55
+ <div class="content"><?php echo $this->getFormattedComment($commentsTab[$id]['comment'], $commentsTab[$id]['review_id']) ?></div>
56
+ <?php $id++;
57
+ endwhile; ?>
58
+ </div>
59
+ <div id="pagination">
60
+ <?php echo $this->getPagination($currentPage, $maxPage) ?>
61
+ </div>
62
+ <?php endif; ?>
63
+
64
  </div>
65
+ <?php endif; ?>
 
 
app/design/frontend/base/default/template/fianet_sceau/page/html/sceau.phtml CHANGED
@@ -1,12 +1,15 @@
1
- <?php if ($this->canDisplay()){
2
- if (Fianet_Sceau_Helper_Data::activateWidgetComments()){
3
- echo "<center><script type='text/javascript' src='http://static.fia-net.com/widgetscomm/".Fianet_Sceau_Helper_Data::getWidgetTransparent()."/".Fianet_Sceau_Helper_Data::getSiteId().".js'></script></center>";
4
- }
5
- else
6
- {
7
- echo "<div id='widget'>
8
- <a target='_blank' href='http://www.fia-net.com/annuaire/". Fianet_Sceau_Helper_Data::getSiteId()."/".Fianet_Sceau_Helper_Data::getLogin().".html'><img height='70' border='0' width='160' title='Voir les avis et commentaires sur le site FIA-NET.com' alt='Evaluation FIA-NET' src='http://static.fia-net.com/widgets/".Fianet_Sceau_Helper_Data::getWidgetTransparent()."/". Fianet_Sceau_Helper_Data::getSiteId().".png'> </a>
9
- <script type='text/javascript'> xt_imgpub = new Image(); xtdmedpub = new Date(); xt_imgpub.src = '&type=ad&hl=' + xtdmedpub.getHours() + 'x' + xtdmedpub.getMinutes() + 'x' + xtdmedpub.getSeconds(); </script>
10
- <br><br></div>";
11
- }
12
- }
 
 
 
1
+ <?php if ($this->canDisplay()) :?>
2
+ <div class='link'>
3
+ <center>
4
+ <?php if (Fianet_Sceau_Helper_Data::activateWidgetComments()) : ?>
5
+ <script type='text/javascript' src='http://static.fia-net.com/widgetscomm/<?php echo Fianet_Sceau_Helper_Data::getWidgetTransparent() ?>/<?php echo trim(Fianet_Sceau_Helper_Data::getSiteId()) ?>.js'></script>
6
+ <?php else : ?>
7
+ <a target='_blank' href='http://www.fia-net.com/annuaire/<?php echo trim(Fianet_Sceau_Helper_Data::getSiteId()) ?>/<?php echo trim(Fianet_Sceau_Helper_Data::getLogin()) ?>.html'>
8
+ <img height='70' border='0' width='160' title='Voir les avis et commentaires sur le site FIA-NET.com' alt='Evaluation FIA-NET' src='http://static.fia-net.com/widgets/<?php echo Fianet_Sceau_Helper_Data::getWidgetTransparent() ?>/<?php echo trim(Fianet_Sceau_Helper_Data::getSiteId()) ?>.png'>
9
+ </a>
10
+ <script type='text/javascript'> xt_imgpub = new Image(); xtdmedpub = new Date(); xt_imgpub.src = '&type=ad&hl=' + xtdmedpub.getHours() + 'x' + xtdmedpub.getMinutes() + 'x' + xtdmedpub.getSeconds(); </script>
11
+ <?php endif; ?>
12
+ </center>
13
+ </div>
14
+ <br />
15
+ <?php endif; ?>
app/etc/modules/zFianet_Sceau.xml CHANGED
@@ -5,7 +5,7 @@
5
  <active>true</active>
6
  <codePool>community</codePool>
7
  <!-- declare module's version information for database updates -->
8
- <version>1.0.4</version>
9
  </Fianet_Sceau>
10
  </modules>
11
- </config>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
  <!-- declare module's version information for database updates -->
8
+ <version>1.1.0</version>
9
  </Fianet_Sceau>
10
  </modules>
11
+ </config>
app/locale/fr_FR/Fianet_Sceau.csv CHANGED
@@ -1,6 +1,5 @@
1
  "Sceau de confiance","Sceau de confiance"
2
- "Product types: global configuration by category","Types de produits : configuration globale par catégorie"
3
- "Product types: personalized configuration for each product","Types de produits : configuration personalisée par produit"
4
  "Shipping types configuration","Configuration des types de livraison"
5
  "Categories list","Liste des catégories"
6
  "Website Categories","Catégories Boutique"
@@ -8,6 +7,19 @@
8
  "Site ID","Site ID"
9
  "Private key","Clé privée"
10
  "Login","Login"
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  "Automatic sending orders","Envoi automatique des commandes"
12
  "FIA-NET URL","URL de FIA-NET"
13
  "[TEST] Sending script's orders","[PROD] Script d'envoi des commandes"
@@ -19,7 +31,7 @@
19
  "Widget configuration","Configuration du Widget"
20
  "Select the status for which the transaction will be sent to Sceau de Confiance system (multiple selections possible)","Selectionnez le statut pour lequel la transaction sera soumise au système Sceau de Confiance (multisélection possible)"
21
  "Enable comments","Activer les commentaires"
22
- "widget transparent","Transparence du Widget"
23
  "Correspond à votre identifiant marchand FIA-NET","Correspond à votre identifiant marchand FIA-NET"
24
 
25
  "Envoyer à FIA-NET sceau","Envoyer le questionnaire FIA-NET"
@@ -29,4 +41,4 @@
29
  "Sceau: order #%s sending error : %s.","Sceau : commande #%s erreur lors de l'envoi : %s"
30
  "Sceau: order #%s error in products configuration.","Sceau : commande #%s erreur dans la configuration des produits"
31
  "Sceau: order #%s error in shipping configuration.","Sceau : commande #%s erreur dans la configuration des méthodes de livraison"
32
- "Sceau: order #%s sent.","Sceau: commande #%s envoyée."
1
  "Sceau de confiance","Sceau de confiance"
2
+ "Product types configuration by category","Configuration des types de produits par catégorie"
 
3
  "Shipping types configuration","Configuration des types de livraison"
4
  "Categories list","Liste des catégories"
5
  "Website Categories","Catégories Boutique"
7
  "Site ID","Site ID"
8
  "Private key","Clé privée"
9
  "Login","Login"
10
+ "Site ID, Login, Password and Private key are provided in your FIA-NET account","Le Site ID, Login, Mot de passe et Clé privée sont ceux fournis par FIA-NET"
11
+ "Questionnaires language","Langue des questionnaires"
12
+ "French","Français"
13
+ "English","Anglais"
14
+ "Spanish","Espagnol"
15
+ "German","Allemand"
16
+ "Products Reviews configuration","Configuration des Avis Produits"
17
+ "Enable the feature","Activer la fonctionnalité"
18
+ "Enable sending of product's questionnaires","Active l'envoi des questionnaires produits"
19
+ "Display of customer reviews about products","Affichage des avis clients sur les pages produits"
20
+ "Maximum number of reviews per page","Nombre maximum d'avis par page"
21
+ "Maximum delay to display of reviews (in days)","Délai maximum d'affichage des avis (en jours)"
22
+ "Not display reviews after [text] days. Leave blank to display all","Désafficher les avis après [texte] jours. Laisser vide pour tout afficher"
23
  "Automatic sending orders","Envoi automatique des commandes"
24
  "FIA-NET URL","URL de FIA-NET"
25
  "[TEST] Sending script's orders","[PROD] Script d'envoi des commandes"
31
  "Widget configuration","Configuration du Widget"
32
  "Select the status for which the transaction will be sent to Sceau de Confiance system (multiple selections possible)","Selectionnez le statut pour lequel la transaction sera soumise au système Sceau de Confiance (multisélection possible)"
33
  "Enable comments","Activer les commentaires"
34
+ "Widget transparent","Transparence du Widget"
35
  "Correspond à votre identifiant marchand FIA-NET","Correspond à votre identifiant marchand FIA-NET"
36
 
37
  "Envoyer à FIA-NET sceau","Envoyer le questionnaire FIA-NET"
41
  "Sceau: order #%s sending error : %s.","Sceau : commande #%s erreur lors de l'envoi : %s"
42
  "Sceau: order #%s error in products configuration.","Sceau : commande #%s erreur dans la configuration des produits"
43
  "Sceau: order #%s error in shipping configuration.","Sceau : commande #%s erreur dans la configuration des méthodes de livraison"
44
+ "Sceau: order #%s sent.","Sceau : commande #%s envoyée."
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fianet_Sceau</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FIA-NET Sceau de Confiance</summary>
10
  <description>Seal of trust FIA-NET</description>
11
- <notes>fifth official commit</notes>
12
  <authors><author><name>FIA-NET</name><user>auto-converted</user><email>support-boutique@fia-net.com</email></author></authors>
13
- <date>2013-12-09</date>
14
- <time>15:03:03</time>
15
- <contents><target name="magecommunity"><dir name="Fianet"><dir name="Sceau"><dir name="Block"><dir name="Catalog"><file name="ProductsReviews.php" hash="80b7ecc97f25a442060c4471a5068032"/></dir><dir name="Logo"><file name="Abstract.php" hash="c3b9d566fb937f5093e5d49b021e82df"/><file name="Footer.php" hash="af103617947cbbd5d5a32468757b691b"/><file name="Left.php" hash="87fb4aab3af002792282eaea5f806cf4"/><file name="Right.php" hash="692839ed3361af84561468245c15e4e3"/></dir><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="1728f5da74fa5ab799f603dfd338a1e1"/></dir><file name="Order.php" hash="8caae3cbc5d66a55505664027138d866"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="Fianet.php" hash="97b2dadc4011ce836781cc7d7d6a244b"/></dir><dir name="Renderer"><file name="Fianet.php" hash="ddb152623c2fd3f832e0c22f81819a32"/></dir></dir></dir><file name="Abstract.php" hash="34081f22dc73992f7b4fc6575ca7fd01"/><file name="Footer.php" hash="46b8ff738bebeb17b4c80bab3f8414a2"/><file name="Left.php" hash="9a81ebcfd5dbd11a6f0a4a23158157ed"/><file name="Right.php" hash="807cf3507a6d4177f3bbdc8be3f14f11"/></dir></dir><dir name="Helper"><file name="Data.php" hash="274558c312b6997f367f2297971f7137"/></dir><dir name="Model"><dir name="Categories"><file name="Association.php" hash="05d7c01cfc0eaa4b11677d0a5e9601ef"/></dir><dir name="Mysql4"><dir name="Categories"><dir name="Association"><file name="Collection.php" hash="f97eec5090921ca8e226167b7e0e152a"/></dir><file name="Association.php" hash="c159bea78e252c961e7cbaf6a29d2738"/></dir><dir name="Shipping"><dir name="Association"><file name="Collection.php" hash="bc99928aa71622baac8bea35d095f9ef"/></dir><file name="Association.php" hash="dfec437432bbb15aa2343e9135a69181"/></dir></dir><dir name="Shipping"><file name="Association.php" hash="8bc91127879515d4328db0ab46325384"/></dir><dir name="Source"><file name="Mode.php" hash="ac805c9b29096a3f6b317809733298a8"/><file name="ProductType.php" hash="35bdafbf86f7bde6901eff2b11c3c297"/><file name="ShippingType.php" hash="75e2ea777d3d4562b394cfb3141aa685"/><file name="Status.php" hash="55a727b776e617289242db7bfeb46fce"/></dir><file name="Observer.php" hash="d66271735ecd40efa54d1005daf40048"/><file name="Order.php" hash="b4eb827cc7533948adb57feb1974c3f1"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategoriesController.php" hash="3b140e5ffa63d87c6ffb634c270d0ce1"/><file name="ProductsController.php" hash="28b094ee3ad7e626f7d377dd41f80b48"/><file name="ShippingController.php" hash="92bb0235bd87d979e66fdf6f591736e5"/></dir><file name="IndexController.php" hash="a2523c0123ddb64df0c225f18d4c8e8b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b8df90b22890cc01b66ff61f62083c5c"/><file name="config.xml" hash="d801f1f2c3903e0a43be41ca496bf930"/><file name="system.xml" hash="9d5aec92fd69db94fb37241d7285d800"/></dir><dir name="sql"><dir name="fianet_sceau_setup"><file name="mysql4-install-1.0.0.php" hash="6fe72a93348606c385fa4dc69a078ada"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="f5e70abde67d076c1730788ec4718939"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fianet_sceau.xml" hash="cbfb390109aa75b15794696471ee7da9"/></dir><dir name="template"><dir name="fianet_sceau"><dir name="page"><dir name="html"><file name="logo.phtml" hash="642dc18c04fea9ef9b00e9cd56f23134"/><file name="productsReviews.phtml" hash="ccde0ea627446780ae5cc0d9429057cb"/><file name="sceau.phtml" hash="ef2c379a26b4b367b6608ef3f0c390e9"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fianet_sceau.xml" hash="3e56c10677bc0d2204f6395595547000"/></dir><dir name="template"><dir name="fianet_sceau"><file name="categories.phtml" hash="f3f63d3b3353a467fb84a3faf23a5704"/><file name="products.phtml" hash="b0f757caa343e2cace10593b3aef2fbe"/><file name="shipping.phtml" hash="701fdfbf67a49501c030cb8215cfbdc9"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="zFianet_Sceau.xml" hash="7815c8026865cb7b340a363724832179"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Fianet_Sceau.csv" hash="e3286ad95eb632025c3233708576dd79"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="sceau"><file name="ko.PNG" hash="fe3a3f44292e6f6f3e7d6c90d22ddd54"/><file name="ok.JPG" hash="ce957f7ccb1e07277f9302f0e1fe4908"/><file name="ok.PNG" hash="f751d2b0e1eb1883144c60a8c87db2cb"/><file name="top_left_block_login.png" hash="30eb50342a004e39ac69faa0f7654701"/><file name="warning.gif" hash="c774f46bf0af9b2e5bde5789901c5083"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="sceau"><file name="logo_fianet_sceau.png" hash="befd6502a28deb2384674f696b9e1aa3"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><package><name>Fianet_Core</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fianet_Sceau</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FIA-NET Sceau de Confiance</summary>
10
  <description>Seal of trust FIA-NET</description>
11
+ <notes>Official commit</notes>
12
  <authors><author><name>FIA-NET</name><user>auto-converted</user><email>support-boutique@fia-net.com</email></author></authors>
13
+ <date>2014-09-02</date>
14
+ <time>09:47:36</time>
15
+ <contents><target name="magecommunity"><dir name="Fianet"><dir name="Sceau"><dir name="Block"><dir name="Catalog"><file name="ProductsReviews.php" hash="25cc10f954860a30154f33cc1f40e3c8"/></dir><dir name="Logo"><file name="Abstract.php" hash="c3b9d566fb937f5093e5d49b021e82df"/><file name="Footer.php" hash="af103617947cbbd5d5a32468757b691b"/><file name="Left.php" hash="87fb4aab3af002792282eaea5f806cf4"/><file name="Right.php" hash="692839ed3361af84561468245c15e4e3"/></dir><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="1728f5da74fa5ab799f603dfd338a1e1"/></dir><file name="Order.php" hash="8caae3cbc5d66a55505664027138d866"/></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="Fianet.php" hash="97b2dadc4011ce836781cc7d7d6a244b"/></dir><dir name="Renderer"><file name="Fianet.php" hash="77abadb34fdfa0dbccaca57328dfd648"/></dir></dir></dir><file name="Abstract.php" hash="34081f22dc73992f7b4fc6575ca7fd01"/><file name="Footer.php" hash="46b8ff738bebeb17b4c80bab3f8414a2"/><file name="Left.php" hash="9a81ebcfd5dbd11a6f0a4a23158157ed"/><file name="Right.php" hash="807cf3507a6d4177f3bbdc8be3f14f11"/></dir></dir><dir name="Helper"><file name="Data.php" hash="e1bb2071a00e5dbd6700d9434c02192d"/></dir><dir name="Model"><dir name="Avisproduits"><file name="Commentaires.php" hash="fbe323d5e61f854cb22756bdac31994b"/></dir><dir name="Categories"><file name="Association.php" hash="05d7c01cfc0eaa4b11677d0a5e9601ef"/></dir><dir name="Fianet"><dir name="Order"><file name="Sceau.php" hash="e4daee79f550c54f3cc31a1e42a6c3a1"/></dir><file name="Productsreviews.php" hash="7d0e7e63e9fc2fd80eda947f69a9549e"/></dir><dir name="Mysql4"><dir name="Avisproduits"><dir name="Commentaires"><file name="Collection.php" hash="9ec0204994a36e0e25873ee680ae0c67"/></dir><file name="Collection.php" hash="605825d9be4ef7aac76fe2057e35541c"/><file name="Commentaires.php" hash="4b49645a47ca958c46e6bd9c8062708f"/></dir><dir name="Categories"><dir name="Association"><file name="Collection.php" hash="f97eec5090921ca8e226167b7e0e152a"/></dir><file name="Association.php" hash="c159bea78e252c961e7cbaf6a29d2738"/></dir><dir name="Shipping"><dir name="Association"><file name="Collection.php" hash="bc99928aa71622baac8bea35d095f9ef"/></dir><file name="Association.php" hash="dfec437432bbb15aa2343e9135a69181"/></dir><file name="Avisproduits.php" hash="39c0b6435566c3a7139264d578c879fb"/></dir><dir name="Shipping"><file name="Association.php" hash="8bc91127879515d4328db0ab46325384"/></dir><dir name="Source"><file name="Language.php" hash="81c2c491ebbb550cc6460a51b6afe712"/><file name="Mode.php" hash="6ad379b3514bcd1335e10ef6116ae949"/><file name="Pagination.php" hash="15b255094a1e39c4bfede1855245a294"/><file name="ProductType.php" hash="35bdafbf86f7bde6901eff2b11c3c297"/><file name="ShippingType.php" hash="75e2ea777d3d4562b394cfb3141aa685"/><file name="Status.php" hash="64f0a26fe72c496ecc8538313d614099"/></dir><file name="Avisproduits.php" hash="62ebc2a39c1422cb60da1733ea3aa07a"/><file name="Observer.php" hash="ead2dbc51a612678a3d04f1b7fcc0a8c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CategoriesController.php" hash="3b140e5ffa63d87c6ffb634c270d0ce1"/><file name="CategoriesController.php.old" hash="fae5ee21d97f3549630b3c9e241115af"/><file name="ProductsController.php" hash="f5baa69400887184c962994c3407d610"/><file name="ShippingController.php" hash="81c4526f195327074bd41d507f11e520"/></dir><file name="IndexController.php" hash="0fbe00540d6c04b48706f5b632bc97a1"/><file name="ProductsreviewsController.php" hash="36e9335a54015f159969d53a255c2085"/></dir><dir name="etc"><file name="adminhtml.xml" hash="04e137ec740c3a060b2f26f82404a17c"/><file name="config.xml" hash="07253265da2914f0642d0dca0b2ed5a8"/><file name="system.xml" hash="9ff86abb50017e857b8104cb1ddba2b4"/></dir><dir name="sql"><dir name="fianet_sceau_setup"><file name="mysql4-install-1.0.0.php" hash="6fe72a93348606c385fa4dc69a078ada"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="f5e70abde67d076c1730788ec4718939"/><file name="mysql4-upgrade-1.0.4-1.1.0.php" hash="8e2c05d166208268ce9070a13d2e727c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fianet_sceau.xml" hash="0358febbff6aae3401eb9c0176f246d6"/></dir><dir name="template"><dir name="fianet_sceau"><dir name="page"><dir name="html"><file name="logo.phtml" hash="8a80aad93f07e6e60386363f93ac6943"/><file name="productsReviews.phtml" hash="371fd6394eb7ef75a26ebb57d31d4953"/><file name="sceau.phtml" hash="d4edc0a31d564e5d6d35f189727544dc"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fianet_sceau.xml" hash="3e56c10677bc0d2204f6395595547000"/></dir><dir name="template"><dir name="fianet_sceau"><file name="categories.phtml" hash="f3f63d3b3353a467fb84a3faf23a5704"/><file name="products.phtml" hash="cff7f9e88518e7198aa26fa49ba01931"/><file name="shipping.phtml" hash="701fdfbf67a49501c030cb8215cfbdc9"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="zFianet_Sceau.xml" hash="c3110b94961b6ee187052a924c78f5ae"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Fianet_Sceau.csv" hash="7e7f8e6486206fa8ad498a26587d8354"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="sceau"><file name="10star.png" hash="89e9087e3566c203211b1949fb5e259d"/><file name="15star.png" hash="adfde5f3de162aa8c5cc7bafdb3b27b6"/><file name="20star.png" hash="1bedf78544acac179d1ddfe1d40039af"/><file name="25star.png" hash="3818be1921faa9af18ed9d71da5b0675"/><file name="30star.png" hash="1bc3331503bd6244c42e87b2db95b57c"/><file name="35star.png" hash="5c2f52d3500a2da9a86245ee9a1e1bb4"/><file name="40star.png" hash="7d40077e4454c297a5866569f4fda731"/><file name="45star.png" hash="d7e8acbeab91a3a665defabef9b4901d"/><file name="50star.png" hash="3198000c157efffee17fffda4beb630c"/><file name="5star.png" hash="2fc56de1808c1de615d59530660d83d2"/><file name="fond_comment.png" hash="87b33e2b603f4b472612b38951e5b625"/><file name="logo-fianet-transparent.png" hash="a5cdf5002c36a2cf4d5f944617cd2dcb"/><file name="logo_fianet_sceau.png" hash="befd6502a28deb2384674f696b9e1aa3"/><file name="ncstar.png" hash="c2a72391af53b06fd8cf17c69dd48613"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="fianet"><file name="sceau.js" hash="eb76770affa84faa301e55c67b630da1"/><file name="sceau.css" hash="f342ab1385775a649d4c83ef43eddf5c"/></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="fianet"><file name="sceau.js" hash="eb76770affa84faa301e55c67b630da1"/><file name="sceau.css" hash="e9a3118b9a8db890cc1f6ddfb1a63245"/></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><package><name>Fianet_Core</name><channel>community</channel><min>1.0.6</min><max></max></package></required></dependencies>
18
  </package>
skin/adminhtml/default/default/images/sceau/ko.PNG DELETED
Binary file
skin/adminhtml/default/default/images/sceau/ok.JPG DELETED
Binary file
skin/adminhtml/default/default/images/sceau/ok.PNG DELETED
Binary file
skin/adminhtml/default/default/images/sceau/top_left_block_login.png DELETED
Binary file
skin/adminhtml/default/default/images/sceau/warning.gif DELETED
Binary file
skin/frontend/base/default/images/sceau/10star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/15star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/20star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/25star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/30star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/35star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/40star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/45star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/50star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/5star.png ADDED
Binary file
skin/frontend/base/default/images/sceau/fond_comment.png ADDED
Binary file
skin/frontend/base/default/images/sceau/logo-fianet-transparent.png ADDED
Binary file
skin/frontend/base/default/images/sceau/ncstar.png ADDED
Binary file
skin/frontend/default/default/fianet/sceau.css ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ div #productsreviews-view {
2
+ font-weight: bold;
3
+ padding-top: 25px;
4
+ padding-bottom: 30px;
5
+ padding-right: 25px;
6
+ padding-left: 25px;
7
+ font: 12px/1.55 Arial, Helvetica, sans-serif;
8
+ border: 1px solid #c4c6c8;
9
+ background: #fff url(../images/bkg_product-view.gif) 100% 0 no-repeat;
10
+ text-align:center;
11
+ color: black;
12
+ }
13
+
14
+ div #productsreviews-head {
15
+ height: 60px;
16
+ width: 100%;
17
+ }
18
+
19
+ div #fianet-logo {
20
+ float: left;
21
+ line-height:50px;
22
+ text-align:center;
23
+ }
24
+
25
+ div #comment-note{
26
+ float: right;
27
+ padding-left: 30px;
28
+ font-size: 12px;
29
+ text-align:center;
30
+ line-height:17px;
31
+ font-weight: bold;
32
+ }
33
+
34
+ div #product-note{
35
+ float: right;
36
+ padding-left: 15px;
37
+ font-weight: bold;
38
+ font-size: 20px;
39
+ color: #5A464B;
40
+ line-height:70px;
41
+ text-align:center;
42
+ }
43
+
44
+ div #global-note {
45
+ float: right;
46
+ text-align:center;
47
+ padding-bottom: 2px;
48
+ }
49
+
50
+ div #border {
51
+ height: 30px;
52
+ border-bottom: 1px solid #ccc;
53
+ }
54
+
55
+ div #productsreviews-tab {
56
+ border-bottom: 1px solid #ccc;
57
+ padding-top: 20px;
58
+ padding-right: 25px;
59
+ padding-left: 25px;
60
+ }
61
+
62
+ div #pagination {
63
+ float: right;
64
+ }
65
+
66
+ #global-note p {
67
+ font-size: 12px;
68
+ margin: 0 0 1px;
69
+ padding-top: 5px;
70
+ }
71
+
72
+ #product-note p {
73
+ display: inline;
74
+ font-size: 46px;
75
+ font-weight:bold;
76
+ padding: 0 0 1px;
77
+ margin: 0 0 1px;
78
+ }
79
+
80
+ .title-logo {
81
+ font-weight: bold;
82
+ line-height:30px;
83
+ color: #5A464B;
84
+ font-size: 21px;
85
+ padding-bottom: 2px;
86
+ }
87
+
88
+ .title-note {
89
+ font-weight: bold;
90
+ color: #5A464B;
91
+ font-size: 21px;
92
+ padding: 0 0 0px;
93
+ margin: 0 0 1px;
94
+ }
95
+
96
+ .title-note2 {
97
+ font-weight: bold;
98
+ line-height:37px;
99
+ color: #5A464B;
100
+ font-size: 21px;
101
+ padding-bottom: 2px;
102
+ }
103
+
104
+ .note {
105
+ font-weight: bold;
106
+ color: #5A464B;
107
+ font-size: 17px;
108
+ padding: 0 0 1px;
109
+ margin: 0 0 1px;
110
+ }
111
+
112
+ .head1 {
113
+ height:15px;
114
+ text-align: left;
115
+ width:15%;
116
+ float:left;
117
+ }
118
+
119
+ .head2 {
120
+ height:15px;
121
+ text-align: left;
122
+ width:55%;
123
+ float:left;
124
+ font-weight:bold;
125
+ }
126
+
127
+ .head3 {
128
+ height:15px;
129
+ text-align: right;
130
+ width:30%;
131
+ float:right;
132
+ font-weight:bold;
133
+ }
134
+
135
+ .content {
136
+ text-align: left;
137
+ clear:both;
138
+ width:85%;
139
+ padding-bottom:20px;
140
+ padding-left: 87px;
141
+ }
skin/frontend/default/default/fianet/sceau.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // M�thode pour changer la visiblit� d'une balise dont l'ID est pass�e en param�tre
2
+ function toggleVisibility(tagId) {
3
+ if (!document.getElementById) {
4
+ return false;
5
+ }
6
+
7
+ var tagToToggle1;
8
+ var tagToToggle2;
9
+ tagToToggle1 = document.getElementById("text"+tagId);
10
+ tagToToggle2 = document.getElementById("linktext"+tagId);
11
+ if (tagToToggle1.style.display == 'none') {// Si le navigateur n'est pas IE
12
+ tagToToggle1.style.display = 'inline';
13
+ tagToToggle2.style.display = 'none';
14
+ }
15
+ if (tagToToggle1.style.visibility == 'hidden') {// Pour IE
16
+ tagToToggle1.style.visibility = 'visible';
17
+ tagToToggle2.style.visibility = 'hidden';
18
+ }
19
+ }
20
+
21
+ function toggleInvisibility(tagId) {
22
+ if (!document.getElementById) {
23
+ return false;
24
+ }
25
+
26
+ var tagToToggle1;
27
+ var tagToToggle2;
28
+ tagToToggle1 = document.getElementById("text"+tagId);
29
+ tagToToggle2 = document.getElementById("linktext"+tagId);
30
+ if (tagToToggle1.style.display == 'inline') {// Si le navigateur n'est pas IE
31
+ tagToToggle1.style.display = 'none';
32
+ tagToToggle2.style.display = 'inline';
33
+ }
34
+ if (tagToToggle1.style.visibility == 'visible') {// Pour IE
35
+ tagToToggle1.style.visibility = 'hidden';
36
+ tagToToggle2.style.visibility = 'visible';
37
+ }
38
+ }
skin/frontend/rwd/default/fianet/sceau.css ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ div #productsreviews-view {
2
+ font-weight: bold;
3
+ padding-top: 25px;
4
+ padding-bottom: 30px;
5
+ padding-right: 15px;
6
+ padding-left: 15px;
7
+ font: 12px/1.55 Arial, Helvetica, sans-serif;
8
+ border: 1px solid #c4c6c8;
9
+ background: #fff url(../images/bkg_product-view.gif) 100% 0 no-repeat;
10
+ text-align:center;
11
+ color: black;
12
+ min-width: 410px;
13
+ }
14
+
15
+ div #productsreviews-head {
16
+ text-align:center;
17
+ height: 60px;
18
+ width: 100%;
19
+ }
20
+
21
+ div #fianet-logo {
22
+ float: left;
23
+ line-height:50px;
24
+ text-align:center;
25
+ }
26
+
27
+ div #comment-note{
28
+ float: right;
29
+ padding-left: 30px;
30
+ font-size: 12px;
31
+ text-align:center;
32
+ line-height:17px;
33
+ font-weight: bold;
34
+ }
35
+
36
+ div #product-note{
37
+ float: right;
38
+ padding-left: 15px;
39
+ font-weight: bold;
40
+ font-size: 20px;
41
+ color: #5A464B;
42
+ line-height:70px;
43
+ text-align:center;
44
+ }
45
+
46
+ div #global-note {
47
+ float: right;
48
+ text-align:center;
49
+ padding-bottom: 2px;
50
+ }
51
+
52
+ div #border {
53
+ height: 30px;
54
+ border-bottom: 1px solid #ccc;
55
+ }
56
+
57
+ div #productsreviews-tab {
58
+ border-bottom: 1px solid #ccc;
59
+ padding-top: 20px;
60
+ }
61
+
62
+ div #pagination {
63
+ float: right;
64
+ }
65
+
66
+ #global-note p {
67
+ font-size: 12px;
68
+ margin: 0 0 1px;
69
+ padding-top: 5px;
70
+ }
71
+
72
+ #product-note p {
73
+ display: inline;
74
+ font-size: 46px;
75
+ font-weight:bold;
76
+ padding: 0 0 1px;
77
+ margin: 0 0 1px;
78
+ }
79
+
80
+ .title-logo {
81
+ font-weight: bold;
82
+ line-height:30px;
83
+ color: #5A464B;
84
+ font-size: 21px;
85
+ padding-bottom: 2px;
86
+ }
87
+
88
+ .title-note {
89
+ font-weight: bold;
90
+ color: #5A464B;
91
+ font-size: 21px;
92
+ padding: 0 0 0px;
93
+ margin: 0 0 1px;
94
+ }
95
+
96
+ .title-note2 {
97
+ font-weight: bold;
98
+ line-height:37px;
99
+ color: #5A464B;
100
+ font-size: 21px;
101
+ padding-bottom: 2px;
102
+ }
103
+
104
+ .note {
105
+ font-weight: bold;
106
+ color: #5A464B;
107
+ font-size: 17px;
108
+ padding: 0 0 1px;
109
+ margin: 0 0 1px;
110
+ }
111
+
112
+ .head1 {
113
+ height:15px;
114
+ text-align: left;
115
+ float:left;
116
+ }
117
+
118
+ .head2 {
119
+ height:15px;
120
+ text-align: left;
121
+ float:left;
122
+ font-weight:bold;
123
+ padding-left: 10px;
124
+ }
125
+
126
+ .head3 {
127
+ height:15px;
128
+ text-align: right;
129
+ float:right;
130
+ font-weight:bold;
131
+ }
132
+
133
+ .content {
134
+ text-align: left;
135
+ clear:both;
136
+ width:85%;
137
+ padding-bottom:20px;
138
+ padding-left: 87px;
139
+ }
skin/frontend/rwd/default/fianet/sceau.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // M�thode pour changer la visiblit� d'une balise dont l'ID est pass�e en param�tre
2
+ function toggleVisibility(tagId) {
3
+ if (!document.getElementById) {
4
+ return false;
5
+ }
6
+
7
+ var tagToToggle1;
8
+ var tagToToggle2;
9
+ tagToToggle1 = document.getElementById("text"+tagId);
10
+ tagToToggle2 = document.getElementById("linktext"+tagId);
11
+ if (tagToToggle1.style.display == 'none') {// Si le navigateur n'est pas IE
12
+ tagToToggle1.style.display = 'inline';
13
+ tagToToggle2.style.display = 'none';
14
+ }
15
+ if (tagToToggle1.style.visibility == 'hidden') {// Pour IE
16
+ tagToToggle1.style.visibility = 'visible';
17
+ tagToToggle2.style.visibility = 'hidden';
18
+ }
19
+ }
20
+
21
+ function toggleInvisibility(tagId) {
22
+ if (!document.getElementById) {
23
+ return false;
24
+ }
25
+
26
+ var tagToToggle1;
27
+ var tagToToggle2;
28
+ tagToToggle1 = document.getElementById("text"+tagId);
29
+ tagToToggle2 = document.getElementById("linktext"+tagId);
30
+ if (tagToToggle1.style.display == 'inline') {// Si le navigateur n'est pas IE
31
+ tagToToggle1.style.display = 'none';
32
+ tagToToggle2.style.display = 'inline';
33
+ }
34
+ if (tagToToggle1.style.visibility == 'visible') {// Pour IE
35
+ tagToToggle1.style.visibility = 'hidden';
36
+ tagToToggle2.style.visibility = 'visible';
37
+ }
38
+ }