1

i'm adding product programmatically in magento store(Magento ver. 1.9.0.1).

I want to display and save images On my store from Amazon S3(AWS) in magento (Frontend & BackEnd),

i'm using this extension: https://github.com/arkadedigital/magento-s3.

my issue is i have no idea how to add Amazon S3 image to magento db programmatically.

it is possible then how?

Any help or suggestion will be appreciated.

1

1 Answer 1

1

Hi you can call all media folder from Amazon s3 Follow below tutorial and let me know

https://www.thirdandgrove.com/integrating-magento-with-amazons-cdn-cloudfront

and for full media url you can do like this

$media_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);

and for Your method try this

->addImageToMediaGallery("$media_url/media/catalog/product/1/0/10243-1.png", array('image','thumbnail','small_image'), false, false)

I am not 100% sure its working or not but you can try and let me know

8
  • Thanks for Answer, i did this but my problem is how to add Amazon S3(AWS) in magento database programmatically.im using this inchoo.net/magento/programming-magento/… Aug 29, 2016 at 9:35
  • So you have a problem with ->addImageToMediaGallery this function?? itis taking magento base url instead cdn url Am I right?? Aug 29, 2016 at 9:40
  • yes, you are right.its use store image in Media.in db its store /folde/folder/image.jpg path . Aug 29, 2016 at 9:44
  • so what is your worry when magento fetches its first search on cdn and then if is is not find then check on local Aug 29, 2016 at 9:49
  • i have in insert image path into magento db.it is possible with programmatically? Aug 29, 2016 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.