Skip to content

Instantly share code, notes, and snippets.

View lukeclifton's full-sized avatar

Luke Clifton lukeclifton

  • United Kingdom
View GitHub Profile
@lukeholder
lukeholder / import.php
Last active January 10, 2018 09:58
Basic example to import Products and their variants into Craft Commerce
<?php
namespace Craft;
// This file could be placed into your public_html folder and visited to import a cheese product.
$craft = require '../craft/app/bootstrap.php';
$craft->plugins->loadPlugins();
$newProduct = new Commerce_ProductModel();