Sunnysideup\Ecommerce\Tasks\EcommerceTaskLinkProductWithImages
Add any Image (or other file) to a product using the InternalItemID.
Synopsis
class EcommerceTaskLinkProductWithImages
extends BuildTask
{
- // members
- public bool $verbose = true;
- protected string $title = 'Find product images';
- protected string $description = ' Finds product images (or other files) based on their name. That is, any image name [InteralItemID]_[two digits].[png/gif/jpg/pdf/(etc)] will automatically be linked to the product. For example SKUAAFF_1 or SKU_02. All files ending in a number from 00 to 99 will be added (e.g. 02, 5 or 55) Also SKUAAFF.jpg (without the standard ending with underscore and number) will be added to the product where InternalItemID equals SKUAAFF. ';
- protected string $productManyManyField = 'AdditionalFiles';
- protected integer $start = 0;
- protected integer $limit = 100;
- protected integer $productID = 0;
- // methods
- public void run()
- public void setProductID()
- public void Link()
- protected void nextBatchLink()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Members
protected
- $description
- $limit
—
int
The number of products selected per cycle. - $productID
- $productManyManyField
—
string
In the default e-commerce, each product only has one image. - $start
—
int
Starting point for selecting products Usually starts at zero and goes up to the total number of products. - $title
public
- $verbose
—
Sunnysideup\Ecommerce\Tasks\bool
output messages?