28 private $moduleDataSetup;
37 \
Magento\Cms\Model\PageFactory $pageFactory
39 $this->pageFactory = $pageFactory;
40 $this->moduleDataSetup = $moduleDataSetup;
51 'title' =>
'404 Not Found',
52 'page_layout' =>
'2columns-right',
53 'meta_keywords' =>
'Page keywords',
54 'meta_description' =>
'Page description',
55 'identifier' =>
'no-route',
56 'content_heading' =>
'Whoops, our bad...',
57 'content' =>
"<dl>\r\n<dt>The page you requested was not found, and we have a fine guess why.</dt>\r\n" 58 .
"<dd>\r\n<ul class=\"disc\">\r\n<li>If you typed the URL directly, please make sure the spelling" 59 .
" is correct.</li>\r\n<li>If you clicked on a link to get here, the link is outdated.</li>\r\n" 60 .
"</ul></dd>\r\n</dl>\r\n<dl>\r\n<dt>What can you do?</dt>\r\n<dd>Have no fear, help is near!" 61 .
" There are many ways you can get back on track with Magento Store.</dd>\r\n<dd>\r\n" 62 .
"<ul class=\"disc\">\r\n<li><a href=\"#\" onclick=\"history.go(-1); return false;\">Go back</a> " 63 .
"to the previous page.</li>\r\n<li>Use the search bar at the top of the page to search for your" 64 .
" products.</li>\r\n<li>Follow these links to get you back on track!<br />" 65 .
"<a href=\"{{store url=\"\"}}\">Store Home</a> <span class=\"separator\">|</span> " 66 .
"<a href=\"{{store url=\"customer/account\"}}\">My Account</a></li></ul></dd></dl>\r\n",
72 'title' =>
'Home page',
73 'page_layout' =>
'1column',
74 'identifier' =>
'home',
75 'content_heading' =>
'Home Page',
76 'content' =>
"<p>CMS homepage content goes here.</p>\r\n",
82 'title' =>
'Enable Cookies',
83 'page_layout' =>
'1column',
84 'identifier' =>
'enable-cookies',
85 'content_heading' =>
'What are Cookies?',
86 'content' =>
"<div class=\"enable-cookies cms-content\">\r\n<p>\"Cookies\" are little pieces of data" 87 .
" we send when you visit our store. Cookies help us get to know you better and personalize your" 88 .
" experience. Plus they help protect you and other shoppers from fraud.</p>\r\n" 89 .
"<p style=\"margin-bottom: 20px;\">Set your browser to accept cookies so you can buy items, " 90 .
"save items, and receive customized recommendations. Here’s how:</p>\r\n<ul>\r\n<li>" 91 .
"<a href=\"https://support.google.com/accounts/answer/61416?hl=en\" target=\"_blank\">Google " 92 .
"Chrome</a></li>\r\n<li>" 93 .
"<a href=\"http://windows.microsoft.com/en-us/internet-explorer/delete-manage-cookies\"" 94 .
" target=\"_blank\">Internet Explorer</a></li>\r\n<li>" 95 .
"<a href=\"http://support.apple.com/kb/PH19214\" target=\"_blank\">Safari</a></li>\r\n<li>" 96 .
"<a href=\"https://support.mozilla.org/en-US/kb/enable-and-disable-cookies-website-preferences\"" 97 .
" target=\"_blank\">Mozilla/Firefox</a></li>\r\n</ul>\r\n</div>",
106 foreach ($cmsPages as
$data) {
107 $this->createPage()->setData(
$data)->save();
109 $pageContent = <<<
EOD 110 <div
class=
"privacy-policy cms-content">
111 <div
class=
"message info">
113 Please replace
this text with your Privacy Policy.
114 Please add any additional cookies your website uses below (e.g. Google Analytics).
118 This privacy policy sets out how
this website (hereafter
"the Store") uses and protects any information that
119 you give the Store
while using this website. The Store is committed to ensuring that your privacy is
protected.
120 Should we ask you to provide certain information by which you can be identified when
using this website, then
121 you can be assured that it will only be used in accordance with
this privacy statement. The Store may change
122 this policy from
time to
time by updating
this page. You should check
this page from
time to
time to ensure
123 that you are happy with any changes.
125 <h2>What we collect</h2>
126 <p>We may collect the following information:</p>
129 <li>contact information including email address</li>
130 <li>demographic information such as postcode, preferences and interests</li>
131 <li>other information relevant to customer surveys and/or offers</li>
134 For the exhaustive list of cookies we collect see the <a href=
"#list">List of cookies we collect</a> section.
136 <h2>What we
do with the information we gather</h2>
138 We require
this information to understand your needs and provide you with a better service,
139 and in particular
for the following reasons:
142 <li>Internal record keeping.</li>
143 <li>We may use the information to improve our products and services.</li>
145 We may periodically send promotional emails about
new products, special offers or other information which we
146 think you may
find interesting
using the email address which you have provided.
149 From
time to
time, we may also use your information to contact you
for market research purposes.
150 We may contact you by email, phone, fax or mail. We may use the information to customise the website
151 according to your interests.
156 We are committed to ensuring that your information is secure. In order to prevent unauthorised access or
157 disclosure, we have put in place suitable physical, electronic and managerial procedures to safeguard and
158 secure the information we collect online.
160 <h2>How we use cookies</h2>
162 A cookie is a small file which asks permission to be placed
on your computer
's hard drive. 163 Once you agree, the file is added and the cookie helps analyse web traffic or lets you know when you visit 164 a particular site. Cookies allow web applications to respond to you as an individual. The web application 165 can tailor its operations to your needs, likes and dislikes by gathering and remembering information about 169 We use traffic log cookies to identify which pages are being used. This helps us analyse data about web page 170 traffic and improve our website in order to tailor it to customer needs. We only use this information for 171 statistical analysis purposes and then the data is removed from the system. 174 Overall, cookies help us provide you with a better website, by enabling us to monitor which pages you find 175 useful and which you do not. A cookie in no way gives us access to your computer or any information about you, 176 other than the data you choose to share with us. You can choose to accept or decline cookies. 177 Most web browsers automatically accept cookies, but you can usually modify your browser setting 178 to decline cookies if you prefer. This may prevent you from taking full advantage of the website. 180 <h2>Links to other websites</h2> 182 Our website may contain links to other websites of interest. However, once you have used these links 183 to leave our site, you should note that we do not have any control over that other website. 184 Therefore, we cannot be responsible for the protection and privacy of any information which you provide whilst 185 visiting such sites and such sites are not governed by this privacy statement. 186 You should exercise caution and look at the privacy statement applicable to the website in question. 188 <h2>Controlling your personal information</h2> 189 <p>You may choose to restrict the collection or use of your personal information in the following ways:</p> 192 whenever you are asked to fill in a form on the website, look for the box that you can click to indicate 193 that you do not want the information to be used by anybody for direct marketing purposes 196 if you have previously agreed to us using your personal information for direct marketing purposes, 197 you may change your mind at any time by letting us know using our Contact Us information 201 We will not sell, distribute or lease your personal information to third parties unless we have your permission 202 or are required by law to do so. We may use your personal information to send you promotional information 203 about third parties which we think you may find interesting if you tell us that you wish this to happen. 206 You may request details of personal information which we hold about you under the Data Protection Act 1998. 207 A small fee will be payable. If you would like a copy of the information held on you please email us this 208 request using our Contact Us information. 211 If you believe that any information we are holding on you is incorrect or incomplete, 212 please write to or email us as soon as possible, at the above address. 213 We will promptly correct any information found to be incorrect. 215 <h2><a name="list"></a>List of cookies we collect</h2> 216 <p>The table below lists the cookies we collect and what information they store.</p> 217 <table class="data-table data-table-definition-list"> 221 <th>COOKIE Description</th> 227 <td>The association with your shopping cart.</td> 230 <th>CATEGORY_INFO</th> 231 <td>Stores the category info on the page, that allows to display pages more quickly.</td> 235 <td>The items that you have in the Compare Products list.</td> 239 <td>An encrypted version of your customer id with the store.</td> 242 <th>CUSTOMER_AUTH</th> 243 <td>An indicator if you are currently logged into the store.</td> 246 <th>CUSTOMER_INFO</th> 247 <td>An encrypted version of the customer group you belong to.</td> 250 <th>CUSTOMER_SEGMENT_IDS</th> 251 <td>Stores the Customer Segment ID</td> 254 <th>EXTERNAL_NO_CACHE</th> 255 <td>A flag, which indicates whether caching is disabled or not.</td> 259 <td>Stores form key used by page cache functionality.</td> 263 <td>Your session ID on the server.</td> 267 <td>Allows guests to edit their orders.</td> 270 <th>LAST_CATEGORY</th> 271 <td>The last category you visited.</td> 274 <th>LAST_PRODUCT</th> 275 <td>The most recent product you have viewed.</td> 279 <td>Indicates whether a new message has been received.</td> 283 <td>Indicates whether it is allowed to use cache.</td> 286 <th>PERSISTENT_SHOPPING_CART</th> 287 <td>A link to information about your cart and viewing history if you have asked the site.</td> 290 <th>RECENTLYCOMPARED</th> 291 <td>The items that you have recently compared.</td> 295 <td>Information on products you have emailed to friends.</td> 299 <td>The store view or language you have selected.</td> 302 <th>USER_ALLOWED_SAVE_COOKIE</th> 303 <td>Indicates whether a customer allowed to use cookies.</td> 306 <th>VIEWED_PRODUCT_IDS</th> 307 <td>The products that you have recently viewed.</td> 311 <td>An encrypted list of products added to your Wish List.</td> 314 <th>WISHLIST_CNT</th> 315 <td>The number of items in your Wish List.</td> 322 'title
' => 'Privacy and Cookie Policy
', 323 'content_heading
' => 'Privacy and Cookie Policy
', 324 'page_layout
' => '1column
', 325 'identifier
' => 'privacy-policy-cookie-restriction-mode
', 326 'content
' => $pageContent, 331 $this->createPage()->setData($privacyPageData)->save(); 332 $footerLinksBlock = $this->createPage()->load('footer_links
', 'identifier
'); 333 if ($footerLinksBlock->getId()) { 334 $content = $footerLinksBlock->getContent(); 335 if (preg_match('/<ul>(.*?)<\\/ul>/ims
', $content)) { 336 $content = preg_replace('/<li
class=
"last">/ims
', '<li>
', $content); 337 $replacment = '<li
class=
"last privacy">
' . 338 "<a href=\"{{store direct_url=\"privacy-policy-cookie-restriction-mode\"}}\">" . 339 __('Privacy and Cookie Policy
') . "</a></li>\r\n</ul>"; 340 $content = preg_replace('/<\\/ul>/ims
', $replacment, $content); 341 $footerLinksBlock->setContent($content)->save(); 344 $installer = $this->moduleDataSetup->createMigrationSetup(); 345 $this->moduleDataSetup->startSetup(); 346 $installer->appendClassAliasReplace( 349 Migration::ENTITY_TYPE_BLOCK, 350 Migration::FIELD_CONTENT_TYPE_WIKI, 353 $installer->appendClassAliasReplace( 356 Migration::ENTITY_TYPE_BLOCK, 357 Migration::FIELD_CONTENT_TYPE_WIKI, 360 $installer->appendClassAliasReplace( 363 Migration::ENTITY_TYPE_BLOCK, 364 Migration::FIELD_CONTENT_TYPE_XML, 367 $installer->appendClassAliasReplace( 369 'custom_layout_update_xml
', 370 Migration::ENTITY_TYPE_BLOCK, 371 Migration::FIELD_CONTENT_TYPE_XML, 374 $installer->doUpdateClassAliases(); 375 $this->moduleDataSetup->endSetup(); 381 public static function getDependencies() 389 public static function getVersion() 397 public function getAliases() 407 private function createPage() 409 return $this->pageFactory->create();
__construct(\Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup, \Magento\Cms\Model\PageFactory $pageFactory)
taxRateField find('.mselect-list') .on( 'click.mselect-edit'
taxRateField this edit on("click.mselect-delete", ".mselect-delete", function() { if(!confirm('<?=/*@escapeNotVerified */__( 'Do you really want to delete this tax rate?') ?>')) { return;} var that=$(this), select=that.closest('.mselect-list').prev(), rateValue=that.parent().find( 'input[type="checkbox"]').val();$( 'body').trigger( 'processStart');var ajaxOptions={ type:'POST', data:{ tax_calculation_rate_id:rateValue, form_key:$( 'input[name="form_key"]').val() }, dataType:'json', url:'<?=/*@escapeNotVerified */$block->getTaxRateDeleteUrl() ?>', success:function(result, status) { $( 'body').trigger( 'processStop');if(result.success) { that.parent().remove();select.find( 'option').each(function() { if(this.value===rateValue) { $(this).remove();} });select.trigger( 'change.hiddenSelect');} else { if(result.error_message) alert({ content:result.error_message });else alert({ content:'<?=/*@escapeNotVerified */__( 'An error occurred') ?>' });} }, error:function() { $( 'body').trigger( 'processStop');alert({ content:'<?=/*@escapeNotVerified */__( 'An error occurred') ?>' });} };$.ajax(ajaxOptions);}) .on( 'click.mselectAdd'