Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am yatryan on github.
  • I am yatryan (https://keybase.io/yatryan) on keybase.
  • I have a public key ASBKjl9inZJIioJuXJJLfQn2i6Qxyj6zOX5f0nBi7J7pAQo

To claim this, I am signing this object:

@yatryan
yatryan / import.php
Created May 13, 2016 18:34 — forked from lukeholder/import.php
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();