PageRenderTime 52ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/magento/app/code/core/Mage/Cms/data/cms_setup/data-upgrade-1.6.0.0.0-1.6.0.0.1.php

https://bitbucket.org/jit_bec/shopifine
PHP | 272 lines | 246 code | 2 blank | 24 comment | 2 complexity | 8c1d9a7cb8c8676a9a8e48965cf27759 MD5 | raw file
Possible License(s): LGPL-3.0
  1. <?php
  2. /**
  3. * Magento
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Open Software License (OSL 3.0)
  8. * that is bundled with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/osl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@magentocommerce.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade Magento to newer
  18. * versions in the future. If you wish to customize Magento for your
  19. * needs please refer to http://www.magentocommerce.com for more information.
  20. *
  21. * @category Mage
  22. * @package Mage_Cms
  23. * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
  24. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  25. */
  26. $pageContent = <<<EOD
  27. <p style="color: #ff0000; font-weight: bold; font-size: 13px">
  28. Please replace this text with you Privacy Policy.
  29. Please add any additional cookies your website uses below (e.g., Google Analytics)
  30. </p>
  31. <p>
  32. This privacy policy sets out how {{config path="general/store_information/name"}} uses and protects any information
  33. that you give {{config path="general/store_information/name"}} when you use this website.
  34. {{config path="general/store_information/name"}} is committed to ensuring that your privacy is protected.
  35. Should we ask you to provide certain information by which you can be identified when using this website,
  36. then you can be assured that it will only be used in accordance with this privacy statement.
  37. {{config path="general/store_information/name"}} may change this policy from time to time by updating this page.
  38. You should check this page from time to time to ensure that you are happy with any changes.
  39. </p>
  40. <h2>What we collect</h2>
  41. <p>We may collect the following information:</p>
  42. <ul>
  43. <li>name</li>
  44. <li>contact information including email address</li>
  45. <li>demographic information such as postcode, preferences and interests</li>
  46. <li>other information relevant to customer surveys and/or offers</li>
  47. </ul>
  48. <p>
  49. For the exhaustive list of cookies we collect see the <a href="#list">List of cookies we collect</a> section.
  50. </p>
  51. <h2>What we do with the information we gather</h2>
  52. <p>
  53. We require this information to understand your needs and provide you with a better service,
  54. and in particular for the following reasons:
  55. </p>
  56. <ul>
  57. <li>Internal record keeping.</li>
  58. <li>We may use the information to improve our products and services.</li>
  59. <li>
  60. We may periodically send promotional emails about new products, special offers or other information which we
  61. think you may find interesting using the email address which you have provided.
  62. </li>
  63. <li>
  64. From time to time, we may also use your information to contact you for market research purposes.
  65. We may contact you by email, phone, fax or mail. We may use the information to customise the website
  66. according to your interests.
  67. </li>
  68. </ul>
  69. <h2>Security</h2>
  70. <p>
  71. We are committed to ensuring that your information is secure. In order to prevent unauthorised access or disclosure,
  72. we have put in place suitable physical, electronic and managerial procedures to safeguard and secure
  73. the information we collect online.
  74. </p>
  75. <h2>How we use cookies</h2>
  76. <p>
  77. A cookie is a small file which asks permission to be placed on your computer's hard drive.
  78. Once you agree, the file is added and the cookie helps analyse web traffic or lets you know when you visit
  79. a particular site. Cookies allow web applications to respond to you as an individual. The web application
  80. can tailor its operations to your needs, likes and dislikes by gathering and remembering information about
  81. your preferences.
  82. </p>
  83. <p>
  84. We use traffic log cookies to identify which pages are being used. This helps us analyse data about web page traffic
  85. and improve our website in order to tailor it to customer needs. We only use this information for statistical
  86. analysis purposes and then the data is removed from the system.
  87. </p>
  88. <p>
  89. Overall, cookies help us provide you with a better website, by enabling us to monitor which pages you find useful
  90. and which you do not. A cookie in no way gives us access to your computer or any information about you,
  91. other than the data you choose to share with us. You can choose to accept or decline cookies.
  92. Most web browsers automatically accept cookies, but you can usually modify your browser setting
  93. to decline cookies if you prefer. This may prevent you from taking full advantage of the website.
  94. </p>
  95. <h2>Links to other websites</h2>
  96. <p>
  97. Our website may contain links to other websites of interest. However, once you have used these links
  98. to leave our site, you should note that we do not have any control over that other website.
  99. Therefore, we cannot be responsible for the protection and privacy of any information which you provide whilst
  100. visiting such sites and such sites are not governed by this privacy statement.
  101. You should exercise caution and look at the privacy statement applicable to the website in question.
  102. </p>
  103. <h2>Controlling your personal information</h2>
  104. <p>You may choose to restrict the collection or use of your personal information in the following ways:</p>
  105. <ul>
  106. <li>
  107. whenever you are asked to fill in a form on the website, look for the box that you can click to indicate
  108. that you do not want the information to be used by anybody for direct marketing purposes
  109. </li>
  110. <li>
  111. if you have previously agreed to us using your personal information for direct marketing purposes,
  112. you may change your mind at any time by writing to or emailing us at
  113. {{config path="trans_email/ident_general/email"}}
  114. </li>
  115. </ul>
  116. <p>
  117. We will not sell, distribute or lease your personal information to third parties unless we have your permission
  118. or are required by law to do so. We may use your personal information to send you promotional information
  119. about third parties which we think you may find interesting if you tell us that you wish this to happen.
  120. </p>
  121. <p>
  122. You may request details of personal information which we hold about you under the Data Protection Act 1998.
  123. A small fee will be payable. If you would like a copy of the information held on you please write to
  124. {{config path="general/store_information/address"}}.
  125. </p>
  126. <p>
  127. If you believe that any information we are holding on you is incorrect or incomplete,
  128. please write to or email us as soon as possible, at the above address.
  129. We will promptly correct any information found to be incorrect.
  130. </p>
  131. <h2><a name="list"></a>List of cookies we collect</h2>
  132. <p>The table below lists the cookies we collect and what information they store.</p>
  133. <table class="data-table">
  134. <thead>
  135. <tr>
  136. <th>COOKIE name</th>
  137. <th>COOKIE Description</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. <tr>
  142. <th>CART</th>
  143. <td>The association with your shopping cart.</td>
  144. </tr>
  145. <tr>
  146. <th>CATEGORY_INFO</th>
  147. <td>Stores the category info on the page, that allows to display pages more quickly.</td>
  148. </tr>
  149. <tr>
  150. <th>COMPARE</th>
  151. <td>The items that you have in the Compare Products list.</td>
  152. </tr>
  153. <tr>
  154. <th>CURRENCY</th>
  155. <td>Your preferred currency</td>
  156. </tr>
  157. <tr>
  158. <th>CUSTOMER</th>
  159. <td>An encrypted version of your customer id with the store.</td>
  160. </tr>
  161. <tr>
  162. <th>CUSTOMER_AUTH</th>
  163. <td>An indicator if you are currently logged into the store.</td>
  164. </tr>
  165. <tr>
  166. <th>CUSTOMER_INFO</th>
  167. <td>An encrypted version of the customer group you belong to.</td>
  168. </tr>
  169. <tr>
  170. <th>CUSTOMER_SEGMENT_IDS</th>
  171. <td>Stores the Customer Segment ID</td>
  172. </tr>
  173. <tr>
  174. <th>EXTERNAL_NO_CACHE</th>
  175. <td>A flag, which indicates whether caching is disabled or not.</td>
  176. </tr>
  177. <tr>
  178. <th>FRONTEND</th>
  179. <td>You sesssion ID on the server.</td>
  180. </tr>
  181. <tr>
  182. <th>GUEST-VIEW</th>
  183. <td>Allows guests to edit their orders.</td>
  184. </tr>
  185. <tr>
  186. <th>LAST_CATEGORY</th>
  187. <td>The last category you visited.</td>
  188. </tr>
  189. <tr>
  190. <th>LAST_PRODUCT</th>
  191. <td>The most recent product you have viewed.</td>
  192. </tr>
  193. <tr>
  194. <th>NEWMESSAGE</th>
  195. <td>Indicates whether a new message has been received.</td>
  196. </tr>
  197. <tr>
  198. <th>NO_CACHE</th>
  199. <td>Indicates whether it is allowed to use cache.</td>
  200. </tr>
  201. <tr>
  202. <th>PERSISTENT_SHOPPING_CART</th>
  203. <td>A link to information about your cart and viewing history if you have asked the site.</td>
  204. </tr>
  205. <tr>
  206. <th>POLL</th>
  207. <td>The ID of any polls you have recently voted in.</td>
  208. </tr>
  209. <tr>
  210. <th>POLLN</th>
  211. <td>Information on what polls you have voted on.</td>
  212. </tr>
  213. <tr>
  214. <th>RECENTLYCOMPARED</th>
  215. <td>The items that you have recently compared. </td>
  216. </tr>
  217. <tr>
  218. <th>STF</th>
  219. <td>Information on products you have emailed to friends.</td>
  220. </tr>
  221. <tr>
  222. <th>STORE</th>
  223. <td>The store view or language you have selected.</td>
  224. </tr>
  225. <tr>
  226. <th>USER_ALLOWED_SAVE_COOKIE</th>
  227. <td>Indicates whether a customer allowed to use cookies.</td>
  228. </tr>
  229. <tr>
  230. <th>VIEWED_PRODUCT_IDS</th>
  231. <td>The products that you have recently viewed.</td>
  232. </tr>
  233. <tr>
  234. <th>WISHLIST</th>
  235. <td>An encrypted list of products added to your Wishlist.</td>
  236. </tr>
  237. <tr>
  238. <th>WISHLIST_CNT</th>
  239. <td>The number of items in your Wishlist.</td>
  240. </tr>
  241. </tbody>
  242. </table>
  243. EOD;
  244. $privacyPageData = array(
  245. 'title' => 'Privacy Policy',
  246. 'content_heading' => 'Privacy Policy',
  247. 'root_template' => 'one_column',
  248. 'identifier' => 'privacy-policy-cookie-restriction-mode',
  249. 'content' => $pageContent,
  250. 'is_active' => 1,
  251. 'stores' => array(0),
  252. 'sort_order' => 0
  253. );
  254. Mage::getModel('cms/page')->setData($privacyPageData)->save();
  255. $footerLinksBlock = Mage::getModel('cms/block')->load('footer_links','identifier');
  256. if ($footerLinksBlock->getId()) {
  257. $content = $footerLinksBlock->getContent();
  258. if (preg_match('/<ul>(.*?)<\\/ul>/ims',$content, $matches)) {
  259. $content = preg_replace('/<li class="last">/ims', '<li>',$content);
  260. $replacment = '<li class="last privacy">'
  261. . "<a href=\"{{store direct_url=\"privacy-policy-cookie-restriction-mode\"}}\">"
  262. . "Privacy Policy</a></li>\r\n</ul>";
  263. $content = preg_replace('/<\\/ul>/ims', $replacment, $content);
  264. $footerLinksBlock->setContent($content)->save();
  265. }
  266. }