1. Go to this page and download the library: Download vbpupil/product library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vbpupil / product example snippets
$prod = new SimpleProduct(
'Iphone X',
new Collection()
);
$prod->setLive(true);
$prod->setSlug('iphone-x'); //defines urls safe string
$prod->setDescription(
'<p>The iPhone X, pronounced "iPhone 10," was introduced at Apple\'s September 2017 event as a classic "One more thing...".</p>',
'long_description');
echo $prod->getItem('long_description');
foreach ($prod->getItems() as $desc) {
echo $desc;
}