Posts

Showing posts from September, 2017

Getting Image from directory and show in frontend phtml MAGENTO2

From Admin When image uploaded it saves the only path of the image. After getting collection get the path.  After that <div class="magzainListing"> <ul> <?php $objectManager = \Magento\Framework\App\ObjectManager:: getInstance (); $body = $objectManager -> get ( 'Custom\module\Model\ResourceModel\Magazineinfo\Collection' )-> setOrder ( 'id' , 'ASC' );; ?> <?php foreach ( $body as $content ) { $con = $content -> getBlogContent (); $image = $content -> getBlogImage (); ///Image Path $title = $content -> getBlogTitle (); $storeManager = $objectManager -> get ( 'Magento\Store\Model\StoreManagerInterface' ); $magimage = $storeManager -> getStore ()-> getBaseUrl (\Magento\Framework\UrlInterface:: URL_TYPE_MEDIA ); $imageUrl = $magimage . '/upload/images/' . $image ; //////// Folder==>> upload/image ///////// ?> ...

Through Postman Api send data through JSON and create simple product in Magento2

  Data Written in Postman Api [ {     "product": {       "productenable":1,         "attribute_set_id": 4,         "name": " Product new10",         "sku": "new108",         "price": 200.00,         "specialprice":150,         "special_from_date":"09/15/2017",         "special_to_date":"09/15/2018",         "tax_class":0,         "quantity":100,         "status": 1,         "weight":10,         "visibility":4,         "category":{           "0":41,           "1":50         },         "manufacture_country":"Germany",         "type_id": "simple",       ...