This file contains 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 | |
//creating categories in magento 2 | |
//last verified Magento 2.2.0 27 Oct 2017 | |
use \Magento\Framework\App\Bootstrap; | |
echo 'code by harshvardhanmalpani'; | |
include('./app/bootstrap.php'); | |
$bootstrap = Bootstrap::create(BP, $_SERVER); | |
$objectManager = $bootstrap->getObjectManager(); | |
function createCategory($a='',$b=2,$c=true,$d='',$e='',$f='',$g='') { | |
global $objectManager; |
This file contains 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 | |
// important to focus on the values with "e" scientific notation | |
// interesting results for "0.1",-0, "1" and "042" | |
$arr = ["true", true, false, "false", | |
0, -0.0, 00, "-0", "+0", "-0.0", "+0.0", "0", "0w", "0.0t", | |
"0.1", 0.1, 1, "1", | |
1e4, "2e", 2e4, "2e4", | |
1337e0, "1e3", 1e1, | |
1.3, "1.4", "1t", "1.5n", |
This file contains 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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream websocket { | |
server 127.0.0.1:4050; | |
} | |
server { |
This file contains 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 | |
//// FOR LEGACY API ONLY | |
add_filter('woocommerce_api_order_response', 'harsh_add_shipping_phone_legacy', 99, 1); | |
function harsh_add_shipping_phone($order_data) | |
{ | |
$order_data["billing_address"]["email"] = "XXXX"; | |
$shipping_phone = get_post_meta($order_data["id"],"_shipping_phone",1); | |
if($shipping_phone!==false && strlen($shipping_phone)) | |
{ |
This file contains 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
<?xml version="1.0"?> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | |
<type name="Magento\Catalog\Model\Indexer\Category\Product\Action\Full"> | |
<arguments> | |
<argument name="batchRowsCount" xsi:type="number">1000</argument> | |
</arguments> | |
</type> | |
<type name="Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\BatchSizeCalculator"> | |
<arguments> | |
<argument name="batchRowsCount" xsi:type="array"> |
OlderNewer