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

[Решено] Убрать поднятие страницы вверх при добавлении товара в корзину


igorfelix
 Share

Recommended Posts

Удалить или закоментировать строку $('html, body').animate({ scrollTop: 0 }, 'slow'); в продукте тпл ( catalog\view\theme\Ваша тема\template\product\product.tpl )

  • +1 1
Link to comment
Share on other sites


Удалить или закоментировать строку $('html, body').animate({ scrollTop: 0 }, 'slow'); в продукте тпл ( catalog\view\theme\Ваша тема\template\product\product.tpl )

 

 

неа.. все равно..

Link to comment
Share on other sites


Попробуйте тогда в /catalog/view/javascript/common.js заменить вот это - $('.success').fadeIn('slow'); на - $('.success').dialog({modal: true,buttons: {Ok: function() {$( this ).dialog( "close" );}}});
Ну просто обязана отклюлица ент функция)

  • +1 1
Link to comment
Share on other sites


В функции function addToCart(product_id, quantity) {
    quantity = typeof(quantity) != 'undefined' ? quantity : 1;

 

 

 

попропотому чтовал как вы говорите.. нет... (

Link to comment
Share on other sites


Самое странное то что пробую уже 2 раз на оригинальном 1.5.3.1 и всё рилииет) тоесть эффект прокрутки страницы пропадает, попробуйте полистить кэш браузера и движка, попробуйте...

  • +1 1
Link to comment
Share on other sites


Тоже интересу эи тема. Если реализовать предложенный вариант, окно с уведомлением осинется вверху или в середине экрана? Как сгделать, чтоб было в середине экрана?

Link to comment
Share on other sites


  • 3 months later...

Приветствую!

Если кого интересует, нашел как исправить: нужно в /catalog/view/javascript/common.js в function addToCart(product_id, quantity)
 заменить scrollTop на scroll (в 119 и 131 строках)

На OC1.5.4.1 помогло.

  • +1 3
Link to comment
Share on other sites


  • 6 months later...

Приветствую!

Если кого интересует, нашел как исправить: нужно в /catalog/view/javascript/common.js в function addToCart(product_id, quantity)

 заменить scrollTop на scroll (в 119 и 131 строках)

На OC1.5.4.1 помогло.

Спасипотому что, помогло! Тоже никак не отключалось. Только у меня 1.5.5.1.1 и изменить это нужно было в трех строках - 135, 156, 178.

  • +1 1
Link to comment
Share on other sites


  • 1 year later...

Спасипотому что, помогло! Тоже никак не отключалось. Только у меня 1.5.5.1.1 и изменить это нужно было в трех строках - 135, 156, 178.

Спасипотому что, тоже помогло )) у меня есть была проблемма на теме журнала, им оказался свой скрипт ггде нужно было икое же поправить.

Link to comment
Share on other sites


  • 7 months later...
  • 4 years later...
On 7/14/2013 at 12:07 PM, Yuriy1987 said:

Приветствую!

Если кого интересует, нашел как исправить: нужно в /catalog/view/javascript/common.js в function addToCart(product_id, quantity)
 заменить scrollTop на scroll (в 119 и 131 строках)

На OC1.5.4.1 помогло.

Спасипотому что мил человек ! Всё рилииет ))) 1.5.5.1

Link to comment
Share on other sites


  • 1 month later...
В 14.07.2013 в 11:07, Yuriy1987 сказал:

Приветствую!

Если кого интересует, нашел как исправить: нужно в /catalog/view/javascript/common.js в function addToCart(product_id, quantity)
 заменить scrollTop на scroll (в 119 и 131 строках)

На OC1.5.4.1 помогло.

попропотому чтовал способ на opencart 3.0.3.2  срилиило

строка 333, 306, 177 

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.