Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Кто такое посоветовал? Тот, кто в поисковике ищет на транслите ?нужно для продвижения
3. Поправить контроллер\модель
administrator/components/com_jshopping/controllers/products.php:
administrator/components/com_jshopping/models/products.php:
function addToProductImage($product_id, $name_image, $image_descr) {
$image = JSFactory::getTable('image', 'jshop');
$image->set("image_id", 0);
$image->set("product_id", $product_id);
$image->set("image_name", $name_image);
$image->set("name", $image_descr);
$image->set("ordering", $image->getNextOrder("product_id='".intval($product_id)."'"));
$image->store();
}
function addToProductImage($product_id, $name_image, $image_descr) {
$image = JSFactory::getTable('image', 'jshop');
$image->set("image_id", 0);
$image->set("product_id", $product_id);
$image->set("image_name", $name_image);
$query = "select `alias_ru-RU` from `#__jshopping_products` where `product_id` = '".$db->escape($product_id)."'";
$db->setQuery($query);
$image_descr = $db->loadResult();
$image->set("name", $image_descr);
$image->set("ordering", $image->getNextOrder("product_id='".intval($product_id)."'"));
$image->store();
}
function addToProductImage($product_id, $name_image, $image_descr) {
$image = JSFactory::getTable('image', 'jshop');
$image->set("image_id", 0);
$image->set("product_id", $product_id);
$db = $this->getDbo();
$query = "SELECT `alias_ru-RU` FROM #__jshopping_products WHERE product_id = '".$image->set("product_id", $product_id)."'";
$db->setQuery($query);
$name_image = $db->loadResult();
$image->set("image_name", $name_image);
$image->set("name", $image_descr);
$image->set("ordering", $image->getNextOrder("product_id='".intval($product_id)."'"));
$image->store();
}
function uploadImages($product, $product_id, $post){
$jshopConfig = JSFactory::getConfig();
$dispatcher = JDispatcher::getInstance();
for($i=0; $i<$jshopConfig->product_image_upload_count; $i++){
$alias_tmp = 'alias_ru-RU';
$alias = $product->$alias_tmp;
$upload = new UploadFile($_FILES['product_image_'.$i]);
$upload->setAllowFile(array('jpeg','jpg','gif','png'));
$upload->setDir($jshopConfig->image_product_path);
$upload->setFileNameMd5(0);
$upload->setFilterName(1);
$path_info = pathinfo ($upload->name);
$extension = $path_info['extension'];
$upload->name = $alias . '.' . $extension;