News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

load product images

Started by marvays, November 07, 2019, 06:40:39 AM

Previous topic - Next topic

marvays

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;
}

Milbo

The new core supports remote images using as URL //

Does that help?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

marvays

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 :)