Skip to content

Instantly share code, notes, and snippets.

View Wiejeben's full-sized avatar
👷‍♂️

Maarten de Graaf Wiejeben

👷‍♂️
View GitHub Profile
@Wiejeben
Wiejeben / GenerateProductOpenGraphImage.php
Last active October 11, 2020 00:38
Generates and stores SEOmatic OpenGraph image from Twig file via spatie/browsershot.
<?php
namespace modules\jobs;
use Craft;
use craft\elements\Asset;
use craft\elements\Entry;
use craft\queue\BaseJob;
use craft\web\View;
use nystudio107\seomatic\models\MetaBundle;
@Wiejeben
Wiejeben / Exact_PurchasablesService.php
Created December 19, 2017 15:39
Skip form validation for disabled variants. Also skip form validation for the default variant if the product is disabled.
<?php
/**
* User: Maarten de Graaf
* Date: 19/12/2017
* Time: 15:36
*/
namespace Craft;
use Commerce\Interfaces\Purchasable;
<?php
namespace craft\contentmigrations;
use Craft;
use craft\db\Migration;
use craft\models\Section;
use craft\fields\PlainText;
use craft\models\FieldLayoutTab;
use craft\models\Section_SiteSettings;