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

Окно добавления товара по центру, исчезающее


Recommended Posts

Все привет!

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

 

Находил такое решение:

 

Открываем файл /catalog/view/javascript/common.js
Удаляем прокрутку страницы вверх
$('html, body').animate({ scrollTop: 0 }, 'slow');

 

Заменяем
$('.success').fadeIn('slow');


на
$('.success').dialog({modal: true,buttons: {Ok: function() {$( this ).dialog( "close" );}}});

 

При этом окно появляется в нужном месте, но оно не закрывается автоматом и не знаю, как его оформить (внешний вид).

 

Есть решения?

Link to comment
Share on other sites


$('.success').dialog({modal: true,buttons: {Ok: function() {$( this ).dialog( "close" );}}});  заменить на

 

$('.success').dialog({modal: true,buttons: {Ok: function() {$( this ).dialog( "close" );}}

setTimeout(function(){ $('.success').remove()},5000);                                      // где 5000 - время затухания окна

});

 

вроде так :-) а стили в stylesheet.css оформляйте на вкус покупателя

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.