PHP code example of ict-master-pk / pricemeter-products-php
1. Go to this page and download the library: Download ict-master-pk/pricemeter-products-php 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/ */
ict-master-pk / pricemeter-products-php example snippets
$product = new \Pricemeter\Model\Product($apiToken);
$product = $product->fill([
'id' => 1,
'sku' => 'dummy',
'upc' => "some upc",
'title' => 'Dummy Product title',
'brand' => 'Dummy brandings',
'category' => 'Computers > Battery',
'price' => 350.4,
'discounted_price' => 300.2,
'image_url' => 'https://dummystore.pk/detail_img.jpg',
'url' => 'https://dummystore.pk/q/dummy',
'description' => "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
'availability' => 1,
'rating' => 4.5,
'keywords' => 'dummy, products, items'
]);
# To Insert
$product->insert();
# To Update
$product->update();
# To Delete
$product->delete();
# OR do this in more convenient way as below
(new \Pricemeter\Model\Product($apiToken))->fill([
'id' => 1
])->delete();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.