Skip to content

Instantly share code, notes, and snippets.

View vinaysikarwar's full-sized avatar

Vinay Sikarwar vinaysikarwar

View GitHub Profile
@vinaysikarwar
vinaysikarwar / gist:9fb8f7a8a56be063b34c534c940cb5ae
Created January 17, 2023 05:44
Fetch All Car Make, Model, Trim & Trim Detail data from https://carapi.app/users/api
<?php
ini_set('display_errors', 1);
/** Api Endpoints */
$apiData = array(
'api_endpoint' => "https://carapi.app/api/",
'years_endpoint' => "years",
'makes_endpoint' => "makes",
@vinaysikarwar
vinaysikarwar / update_product_categories.php
Created December 14, 2022 10:31
Update child product categories associated with Configurable product
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('memory_limit', -1);
error_reporting(E_ALL);
use Magento\Framework\App\Bootstrap;
require __DIR__ .'/../app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
@vinaysikarwar
vinaysikarwar / importproduct.php
Created January 19, 2020 13:36
Import Product in Magento2 using CSV
<?php
define('DS', DIRECTORY_SEPARATOR);
use \Magento\Framework\App\Bootstrap;
include('../../app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);
error_reporting(E_ALL);
ini_set('display_errors', 1);
@vinaysikarwar
vinaysikarwar / jsmerge
Last active August 29, 2015 14:05
Avoid jQuery Conflict in merging js
In magento if you merge the js file from enabling the merge js files setting in admin, and if you face the jQuery conflict issue, then you can find the solution in this gist.
if you go to the Mage_Page_Block_Html_Head class file and see the function getcssjshtml then you will know what this function is doing and what i have done to solve the js conflict issue.
One imp[ortant thing you have to take care in this that your jQuery files should be in skin folder and javascript prototype js file files should be in root js folder.
public function getCssJsHtml()
{
// separate items by types
$lines = array();