Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

waterfall

Users
  
  • Posts

    1,384
  • Joined

  • Last visited

Everything posted by waterfall

  1. вот еще ссылка https://opencartforum.com/topic/1741-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D0%BE%D1%87%D1%82%D0%BE%D0%B9-%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B8/ В принципе можно написать модуль, если разобраться с алгоритмом:)
  2. Вот это подойдет? https://opencartforum.com/topic/1859-ems-%D0%BF%D0%BE%D1%87%D1%82%D0%B0-%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B8/
  3. Я бы сделал так: установил старую версию, восстановил там товары, потом проапдейтил на новую
  4. Это модули:) вставить видео https://opencartforum.com/files/file/164-video-filezip/ вставить баннер https://opencartforum.com/files/file/54-html-%D0%BC%D0%BE%D0%B4%D1%83%D0%BB%D1%8C/ Большая просьба указывать версию opencart:)
  5. Нужно все файлы, которые содержат русские буквы пересохранить в кодировке utf-8
  6. в ocstore_v1.0.1 можно сказать что не работает:) когда доделают, тогда наверно и включат
  7. Давайте поставим точный диагноз:) Какая у вас версия opencart? какой модуль для экспорта/импорта используете?
  8. Если дело только в этом, то это просто один запрос в базу данных:)
  9. Быстрее будет использовать Export/Import. Там есть столбец image_name - это и есть путь до картинки. Поэтому я бы сделал так. Залил по фтп, потом привязал одну картинку, потом сделал экспорт, посмотрел, подправил и сделал импорт:)
  10. Сделал инсталяшку для версии ocStore v0.2.2 (OpenCart 1.4.9.4) https://opencartforum.com/files/file/152-desc-ext-images/
  11. да для начала откат Я выложу правленные файлы - похоже при всех этих редактированиях переносах что-то испортилосьВот оригинал..Если останется ошибка, скажи свою версию Opencartpicsign.zip
  12. да для начала откат Я выложу правленные файлы - похоже при всех этих редактированиях переносах что-то испортилось
  13. Подписывание картинок 1. Полный бекап 2. Изменить базу в oc_product_image добавить поле image_desc (varchar(255) can be null) 3. Админка admin/view/template/catalog/product_form.tpl <tr> <td class="left"><input type="hidden" name="product_image[<?php echo $image_row; ?>]" value="<?php echo $product_image['file']; ?>" id="image<?php echo $image_row; ?>" /> <img src="<?php echo $product_image['preview']; ?>" alt="" id="preview<?php echo $image_row; ?>" class="image" onclick="image_upload('image<?php echo $image_row; ?>', 'preview<?php echo $image_row; ?>');" /></td> <td class="left"><a onclick="$('#image_row<?php echo $image_row; ?>').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td> </tr>заменить на <tr> <td class="left"><input type="hidden" name="product_image[<?php echo $image_row; ?>]" value="<?php echo $product_image['file']; ?>" id="image<?php echo $image_row; ?>" /> <img src="<?php echo $product_image['preview']; ?>" alt="" id="preview<?php echo $image_row; ?>" class="image" onclick="image_upload('image<?php echo $image_row; ?>', 'preview<?php echo $image_row; ?>');" /></td> <td><input type='text' name="image_desc[<?php echo $image_row; ?>]" value='<?php echo $product_image['image_desc']; ?>'></td> <td class="left"><a onclick="$('#image_row<?php echo $image_row; ?>').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td> </tr> , function addImage() { html = '<tbody id="image_row' + image_row + '">'; html += '<tr>'; html += '<td class="left"><input type="hidden" name="product_image[' + image_row + ']" value="" id="image' + image_row + '" /><img src="<?php echo $no_image; ?>" alt="" id="preview' + image_row + '" class="image" onclick="image_upload('image' + image_row + '', 'preview' + image_row + '');" /></td>'; html += '<td class="left"><a onclick="$('#image_row' + image_row + '').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>'; html += '</tr>'; html += '</tbody>'; $('#images tfoot').before(html); image_row++;}заменить на function addImage() { html = '<tbody id="image_row' + image_row + '">'; html += '<tr>'; html += '<td class="left"><input type="hidden" name="product_image[' + image_row + ']" value="" id="image' + image_row + '" /><img src="<?php echo $no_image; ?>" alt="" id="preview' + image_row + '" class="image" onclick="image_upload('image' + image_row + '', 'preview' + image_row + '');" /></td>'; [color=#FF0000]html += '<td><input type="text" name="image_desc[' + image_row + ']" value=''></td>';[/color] html += '<td class="left"><a onclick="$('#image_row' + image_row + '').remove();" class="button"><span><?php echo $button_remove; ?></span></a></td>'; html += '</tr>'; html += '</tbody>'; $('#images tfoot').before(html); image_row++;},admin/controller/catalog/product.php if (isset($product_info)) { $results = $this->model_catalog_product->getProductImages($this->request->get['product_id']); foreach ($results as $result) { if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) { $this->data['product_images'][] = array( 'preview' => $this->model_tool_image->resize($result['image'], 100, 100), 'file' => $result['image'] ); } else { $this->data['product_images'][] = array( 'preview' => $this->model_tool_image->resize('no_image.jpg', 100, 100), 'file' => $result['image'] ); } } }заменить на if (isset($product_info)) { $results = $this->model_catalog_product->getProductImages($this->request->get['product_id']); foreach ($results as $result) { if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) { $this->data['product_images'][] = array( 'preview' => $this->model_tool_image->resize($result['image'], 100, 100), 'file' => $result['image'], 'image_desc' => $result['image_desc'] ); } else { $this->data['product_images'][] = array( 'preview' => $this->model_tool_image->resize('no_image.jpg', 100, 100), 'file' => $result['image'], 'image_desc' => $result['image_desc'] ); } } } admin/model/catalog/product.php в addProduct и в editProduct if (isset($data['product_image'])) { foreach ($data['product_image'] as $image) { $this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($image) . "'"); } }заменить на $product_image_desc = array(); $i=0; if (isset($data['product_image'])) { foreach ($data['product_image'] as $image) { $product_image_desc[$i][0] = $image; $i++; } } $k = $i; $i=0; if (isset($data['image_desc'])) { foreach ($data['image_desc'] as $desc) { $product_image_desc[$i][1] = $desc; $i++; } } for ($i=$k-1;$i>=0;$i--) { $this->db->query("INSERT INTO " . DB_PREFIX . "product_image SET product_id = '" . (int)$product_id . "', image = '" . $this->db->escape($product_image_desc[$i][0]) . "', image_desc = '". $this->db->escape($product_image_desc[$i][1]) . "'"); }, public function getProductImages($product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'"); return $query->rows; }заменить на public function getProductImages($product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "' ORDER BY product_image_id desc"); return $query->rows; } 4. Для отображенияв catalog/model/catalog/product.php public function getProductImages($product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'"); return $query->rows; }заменить на public function getProductImages($product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "' ORDER BY product_image_id desc"); return $query->rows; },в catalog/controller/product/product.php $this->data['images'] = array(); $results = $this->model_catalog_product->getProductImages($this->request->get['product_id']); foreach ($results as $result) { $this->data['images'][] = array( 'popup' => $this->model_tool_image->resize($result['image'] , $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')), 'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')) ); }заменить на $this->data['images'] = array(); $results = $this->model_catalog_product->getProductImages($this->request->get['product_id']); foreach ($results as $result) { $this->data['images'][] = array( 'popup' => $this->model_tool_image->resize($result['image'] , $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')), 'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')), 'image_desc' => $result['image_desc'] ); }в catalog/view/theme/ваша тема/template/product/product.tpl <div id="tab_image" class="tab_page"> <?php if ($images) { ?> <div style="display: inline-block;"> <?php foreach ($images as $image) { ?> <div style="display: inline-block; float: left; text-align: center; margin-left: 5px; margin-right: 5px; margin-bottom: 10px;"><a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="thickbox" rel="gallery"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" style="border: 1px solid #DDDDDD; margin-bottom: 3px;" /></a> <span style="font-size: 11px;"><?php echo $text_enlarge; ?></span></div> <?php } ?> </div> <?php } else { ?> <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;"><?php echo $text_no_images; ?></div> <?php } ?> </div>заменить на <div id="tab_image" class="tab_page"> <?php if ($images) { ?> <div style="display: inline-block;"> <?php foreach ($images as $image) { ?> <div style="display: inline-block; float: left; text-align: center; margin-left: 5px; margin-right: 5px; margin-bottom: 10px;"><a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="thickbox" rel="gallery"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" style="border: 1px solid #DDDDDD; margin-bottom: 3px;" /></a> <span style="font-size: 11px;"><?php echo $image['image_desc']; ?></span></div> <?php } ?> </div> <?php } else { ?> <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;"><?php echo $text_no_images; ?></div> <?php } ?> </div>
  14. проверьте названия файлов:)и может нужно обновить Jquery мне это помогло
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.