- Go to
Admin > Stores > All Stores
- Click >
Create Web Site
- In the Name field, enter store name.
- e.g.
Japan
- e.g.
- In the Code field, enter a unique string without spaces and >
Save Web Site
- e.g.
super_jp
- e.g.
- Create Store
- Create Store View
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List (and command that generated it) of places that form key validation has been added in 1.13.1 | |
Controllers that have added form key validation: | |
$ git grep --files-with-matches "this->_validateFormKey())" <core_sources_update_commit_hash> | |
<core_sources_update_commit_hash>:app/code/core/Enterprise/Checkout/controllers/CartController.php | |
<core_sources_update_commit_hash>:app/code/core/Enterprise/GiftRegistry/controllers/IndexController.php | |
<core_sources_update_commit_hash>:app/code/core/Enterprise/GiftRegistry/controllers/ViewController.php | |
<core_sources_update_commit_hash>:app/code/core/Enterprise/Reward/controllers/CustomerController.php | |
<core_sources_update_commit_hash>:app/code/core/Enterprise/Wishlist/controllers/SearchController.php | |
<core_sources_update_commit_hash>:app/code/core/Mage/Catalog/controllers/Product/CompareController.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = "https://wordpress.org/latest.zip"; | |
$zipFile = "wordpress.zip"; // Local Zip File Path | |
$zipResource = fopen($zipFile, "w"); | |
// Get The Zip File From Server | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_FAILONERROR, true); | |
curl_setopt($ch, CURLOPT_HEADER, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get current page URL | |
$URL = $this->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true]); | |
// get current product name & ID | |
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); | |
$product = $objectManager->get('Magento\Framework\Registry')->registry('current_product'); //get current product | |
$id = $product->getId(); | |
$title = $product->getName(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = "https://example.com/"; | |
$url = preg_replace('/^https?:\/\//', '', $url); | |
// output: example.com/ | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: RSS - Recently Updated | |
*/ | |
$args = array( | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'orderby' => 'modified', | |
'order' => 'DESC', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// ***************************************** // | |
// ********** DECLARE VARIABLES ********** // | |
// ***************************************** // | |
$username = 'username'; | |
$password = 'password'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Limit WordPress' the_excerpt to the first full stop / period | |
$strings = preg_split('/(\.|!|\?)\s/', strip_tags($post->post_content), 2, PREG_SPLIT_DELIM_CAPTURE); | |
$excerpt = apply_filters('the_excerpt', $strings[0] . $strings[1]); | |
echo $excerpt; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function lazyload_filter_content($content) { | |
global $post; // getting The whole post objects | |
$content = $post->post_content; | |
if( is_singular() && is_main_query() ) { | |
//Renaming images for lazy loader!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = "releases.csv"; // your csv file name | |
$directory = $_SERVER['DOCUMENT_ROOT']."/var/releases/".$file; // path to file | |
$row = 1; // horizontal | |
if (($handle = fopen($directory, "r")) !== FALSE) { | |
echo '<table id="releases-calendar">'; | |
while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) { // change ";" if your csv delimiter is different... |
OlderNewer