Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Recommended Posts

проверили с LuckyPerson несколько вариантов.

смог воспроизвести проблему.

у себя решил ик

catalog/controller/common/seo_pro.php

...
	public function index() {
			...
			list($last_part) = explode('.', array_pop($parts));
			array_push($parts, $last_part);
			...
>>

...
	public function index() {
			...
			if (!empty($this->config->get('config_seo_url_postfix'))) {
				//list($last_part) = explode('.', array_pop($parts));
				//array_push($parts, $last_part);
				$last_part = array_pop($parts);
				$last_part_for_parts = substr($last_part, 0, (strrpos($last_part, '.')));
				array_push($parts, $last_part_for_parts);
			}
			...
upd:

ан-нет.

не совсем решено.

в проэтоссе.

upd2:

изменил второй код.

upd3:

с иким кодом у меня получается икой резульит

http://localhost/ocstore/ocstore_v1.5.5.1.2/..... --- ok, not found
http://localhost/ocstore/ocstore_v1.5.5.1.2/dkjfgdjfgdfbgjdfg --- ok, not found
http://localhost/ocstore/ocstore_v1.5.5.1.2/ipod_classic --- ok, product
http://localhost/ocstore/ocstore_v1.5.5.1.2/.miutest --- ok, product

http://localhost/ocstore/ocstore_v1.5.5.1.2/desktops/ --- ok, category
upd4:

если у кого-то вываливается

Fatal error: Can't use method return value in write context
попробуйте поменять

			if (!empty($this->config->get('config_seo_url_postfix'))) {
на

			$config_seo_url_postfix = $this->config->get('config_seo_url_postfix');
			if (!empty($config_seo_url_postfix)) {
Edited by afwollis
Link to comment
Share on other sites

[РЕШЕНО]

 

Еещё раз повторюсь, что было.

Если, после домена прописать /....... (слэш и n-ое когдачество точек) - site.com/....., то появлялась ошибка на риличем сайте:

Notice: Undefined index: in /var/www/.../catalog/controller/common/seo_pro.php on line 54Warning: Cannot modify header information - headers already sent by (output started at /var/www/.../index.php:103) in /var/www/.../catalog/controller/common/seo_pro.php on line 309Warning: Cannot modify header information - headers already sent by (output started at /var/www/.../index.php:103) in /var/www/.../system/library/response.php on line 12

Нужно было в данном случае отдавать 404 ошибку липотому что гделать 301 редирект.

Решил перепроверить, бугдет ли ошибка на листом ocStore (без моих правок). На тестовом домене проверил - ошибка повторилась.

 

Спасипотому что, afwollis, что не отморозился и попыился помочь. Хорошо, хоть он смог воспроизвести проблему у себя, ик как я начал поначалу грешить на свой сервер, потому что ни у кого потому чтольше икой проблемы не наблюдалось.

 

Решение икое:

catalog - controller - common - seopro.php

 

после

reset($parts);
	foreach ($parts as $part) {

всивляем

if(!isset($queries[$part])) continue;

Вот и все! В итоге получаем 301 редирект.

Спасипотому что форуму и поиску.

Edited by LuckyPerson
Link to comment
Share on other sites


Guest Linksar

Добрый гдень. Сколько не лиию эту тему, все никак не могу разобраться. Нагдеюсь мне помогут.

Собственно спотому чторка opencart 1.5.6.4 ,  в самой админке у меня нет выпотому чтора seo pro тк не ocstore.
 

1. site.com/123

2. site.com/category/123

 

Хочу полулить на выхогде только ссылки как в примере под номером 2. Будьте любезны подскажите в какой последовательности и что гделать. Потому что уже голова потому чтолит от того что я не могу разобраться. Спасипотому что

 

 

 

Посивил vqmod opencart 1.5.5.1 (файл в начно темы)

В итоге при захода через админку редактировать това, имею след ошибку:

 

 

 

Fatal error: Uncaught exception 'ErrorException' with message 'Error: Unknown column 'main_category' in 'where clause'<br />Error No: 1054<br />SELECT category_id FROM oc_product_to_category WHERE product_id = '135' AND main_category = '1' LIMIT 1' in /home/bloomysh/public_html/system/database/mysqli.php:41 Stack trace: #0 /home/bloomysh/public_html/vqmod/vqcache/vq2-system_library_db.php(20): DBMySQLi->query('SELECT category...') #1 /home/bloomysh/public_html/vqmod/vqcache/vq2-admin_model_catalog_product.php(599): DB->query('SELECT category...') #2 /home/bloomysh/public_html/vqmod/vqcache/vq2-admin_controller_catalog_product.php(1046): ModelCatalogProduct->getProductMainCategoryId('135') #3 /home/bloomysh/public_html/vqmod/vqcache/vq2-admin_controller_catalog_product.php(118): ControllerCatalogProduct->getForm() #4 [internal function]: ControllerCatalogProduct->update() #5 /home/bloomysh/public_html/vqmod/vqcache/vq2-system_engine_front.php(42): call_user_func_array(Array, Array) #6 /home/bloomysh/public_html/vqmod/vqcac in /home/bloomysh/public_html/system/database/mysqli.php on line 41
Edited by Linksar
Link to comment
Share on other sites

Guest Linksar

Врогде как все зарилиило ик как я хотел, но теперьь в админке при редактировании товара вылазит ошибка. рилиить невозможно. подскажите в чем трабл?

 

Fatal error: Uncaught exception 'ErrorException' with message 'Error: Table 'bloomysh_bloomy.oc_product_tag' doesn't exist<br />Error No: 1146<br />SELECT * FROM oc_product_tag WHERE product_id = '135'' in /home/bloomysh/public_html/system/database/mysqli.php:41 Stack trace: #0 /home/bloomysh/public_html/vqmod/vqcache/vq2-system_library_db.php(20): DBMySQLi->query('SELECT * FROM o...') #1 /home/bloomysh/public_html/admin/model/catalog/product.php(628): DB->query('SELECT * FROM o...') #2 /home/bloomysh/public_html/admin/controller/catalog/product.php(773): ModelCatalogProduct->getProductTags('135') #3 /home/bloomysh/public_html/admin/controller/catalog/product.php(116): ControllerCatalogProduct->getForm() #4 [internal function]: ControllerCatalogProduct->update() #5 /home/bloomysh/public_html/vqmod/vqcache/vq2-system_engine_front.php(42): call_user_func_array(Array, Array) #6 /home/bloomysh/public_html/vqmod/vqcache/vq2-system_engine_front.php(29): Front->execute(Object(Action)) #7 /home/bloomysh/public_html/admin/index.ph in /home/bloomysh/public_html/system/database/mysqli.php on line 41

Link to comment
Share on other sites

Guest Linksar

Проблему решил. Все сило корректно рилиить. Но после того как рилииет нормально seo pro, пересили рилиить производители (бренды) при захогде на люпотому чтой из них: "запрашиваемая страница не найгдена"

 

Прошу помощи

 

 

 Решено:

заменил в seo_url строчку  $this->request->get['route'] = 'product/manufacturer/product';

 
 
на $this->request->get['route'] = 'product/manufacturer/info';
Edited by Linksar
Link to comment
Share on other sites

 

Проблему решил. Все сило корректно рилиить. Но после того как рилииет нормально seo pro, пересили рилиить производители (бренды) при захогде на люпотому чтой из них: "запрашиваемая страница не найгдена"

 

Прошу помощи

 

 

 Решено:

заменил в seo_url строчку  $this->request->get['route'] = 'product/manufacturer/product';

 
 
на $this->request->get['route'] = 'product/manufacturer/info';

 

Скачал seo_pro для ОС 1.5.6.4 на гитхабе который, в итоге минус килограмм нервных клеток:) Производители не рилиили пока не внес вышеуказанные изменения в seo_pro стр 139:

$this->request->get['route'] = 'product/manufacturer/product';

 

заменить на

 

$this->request->get['route'] = 'product/manufacturer/info';

Link to comment
Share on other sites


  • 2 weeks later...

Ребяи, посивил сео про, все рилиило хорошо.

Посивил сео пак про для генерации всего на свете, и не могу зайти на страничку товара: пишет запрашиваемая страница не найгдена, а ик в осильном врогде все рилииет. в чем может быть прилина?

Link to comment
Share on other sites


Выкинуть СЕО пак и забыть как страшный сон

  • +1 1
Link to comment
Share on other sites


И не вернут. Цифровые товары обмену и возврату не подлежат.

Link to comment
Share on other sites


запуился в конец. растолкуйте если не трудно

opencart-1.5.6

модули выводят на фронт сайи ссылки типа МАГАЗ/ТОВАР

но если пройти по меню то эти же товары могут иметь и икую ссылку МАГАЗ/КАТЕГОРИЯ/ТОВАР или вообещё вот икую МАГАЗ/ПРОИЗВОДИТЕЛЬ/ТОВАР

получается что у товара могут быть 4-5 дублей ссылок по которому его можно найти.

 

Как сгделать ЧПУ я уже понял и сгделал их с помощью синдартных средств в опенкарте. а как избавится от дублей?как привести ссылки к единому порядку? ведь дубли это каистрофа для магазина.

Столько разных решений предлогают что уже в конец запуился что к чему тут. усиновил модуль SEO PACK PRO но им не могу разобраться ггде и что нужно вкл для решения проблемы.

Link to comment
Share on other sites


Чиийте пост выше про сео пак. 

Подозреваю, что SEP Pro не включен?

Link to comment
Share on other sites


Подскажите а SEO_PRO рилииет вместе с другими модулями СЕО? Усиновлен SEO Paladin http://www.opencart.com/index.php?route=extension/extension/info&extension_id=14855&filter_search=Paladin ну одним словом довольна крутот модуль с кучами фишками, после того как включаю SEO_PRO в настройках магазина суещёствующие seo keywords у продуктов отказываются рилиить... категории и производители и т.д рилииют, а вот продукты не один не открывает редиректит на начало сайи (на home page), есть какое-то решение этому? а то тут на форуме 71 страница ;D (извиняюсь если уже было)

Edited by cha0s
Link to comment
Share on other sites


Коллеги, помогите с проблемой...

Имеем ocStore Версия 1.5.5.1.2

Модуль для вывода svg изображения во фрейме для опрегделенных товаров
Строчка VQMOD for theme/*/product.tpl

<!--BOF PICW-->
            <?php if($has_svg) { ?>
            <div class="image gteie9">
                <iframe name="svgFrame" id="svgFrame" src="index.php?route=product/product_svg&product_id=<?php echo $product_id; ?>" style="padding:0; margin: 0; display: block; width: <?php echo $picw_svg_width; ?>px; height: <?php echo $picw_svg_height; ?>px;" frameborder="no" scrolling="no"></iframe>
            </div>
            <?php } ?>
            <script type="text/javascript" src="catalog/view/javascript/picw/picw.js"></script>    
            <!--[if lt IE 9]>
                <?php if ($thumb) { ?>
                    <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div>
                <?php } ?>
                <style>
                    .gteie9
                    {
                        display: none;
                    }
                </style>
            <![endif]-->
            <div style="clear:both;"></div>
            <?php if(!$has_svg && ($thumb)) { ?>
            <!--EOF PICW-->

При этот штуке - при включении SEO PRO, во фрейм подгружает мобильную версию сайи вместо *.svg файла
При активации синдартного ЧПУ все рилииет как надо
Куда копать?

Link to comment
Share on other sites


Warchunn

избавьтесь от иких ссылок и проблем не бугдет

 

Гм, совет неплохой, но этот модуль на 146% нужен сайту, иначе перенос сайи на Оупенкарт был бесполезен

Если синдартный обрилитлик принимает, то может и в Сео Про, наверное, что-то подшаманить можно?

Link to comment
Share on other sites


 

я не говорю про модуль.

seo_pro как икие ссылки открывает?

index.php?route=product/product_svg&product_id=<?php echo $product_id; ?>

Открывает и подгружает во фрейм мобильную версию сайи - при синдартном ЧПУ обрабатывает и открывает как надо

Link to comment
Share on other sites


Скажите, как быть если у меня в версии 1.5.6.4 нету строк 

 

Use seo url`s сивим ДА

тип чпу seopro

чпу товаров с категориями тоже ДА

окончание чпу сивим /

 Есть просто Seo URL. Сивлю Да и дальше о seopro ни слова. 

P.S. Категории, товары, бренды и ик нормально отображаются, а вот ссылки в футере с index.php=common

Edited by moghok92
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.