Hi. I have extention for my eshop. Extention load gvatar images. I need change it for load product images. But i cant write php. Can anyone hlep me please?
public function logPurchaseVirtuemartEvent($customer, $item)
{
$plugin = $this->getPluginInfo();
$extension_id = $plugin->extension_id;
$template = 'new_product_purchase';
$template = $this->getTemplateInfo($extension_id);
$table = $this->getTable();
$table->template_id = $template->id;
$table->extension_id = $extension_id;
$table->url = "index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=" . $item->virtuemart_product_id . "";
if (!$template->image_disable) {
if ($template->avatar) {
$table->image_url = NotiflyMessageHelper::getGravater($customer->email);
} else {
$table->image_url = $template->image_url;
}
}
// get location from helper
$ip = NotiflyMessageHelper::getRealIpAddr();
$location = NotiflyMessageHelper::getLocation($ip);
$table->title = $item->order_item_name;
$table->name = $customer->name;
$table->email = $customer->email;
$table->ip = $ip;
$table->city = $location['city'];
$table->state = $location['region_name'];
$table->country = $location['country_name'];
$table->created = JHtml::date('now', 'Y-m-d H:i:s');
$table->published = 1;
$table->store();
return true;
}
The new core supports remote images using as URL //
Does that help?
I am sorry, but understand :( I dontk know, what must do, for loading product image. I can send all component for you, if you need :)