Post by chintorwebs » Sat Aug 06, 2016 1:51 pm

Hello, Am having issue on product page.

When we click on "write a review", Actually the review tab opens but you stay on the same place, page does not move down to review form, it looks that nothing happens, until you go down the page. It doesn't go to the form automatically, we have to scroll down manually.

What I want is to make, is when you click on the "write review", need to get the review form instantly by jumping down to the review form.

I checked on default opencart demo, there's also same issue.

Please check this link

http://www.zazmar.co.uk/index.php?route ... duct_id=50

Please click on "Write a Review" (above social icons, below order button), nothing happens. It should go back to the review form.

Please help me anyone to fix this.

Thanks & Regards.

New member

Posts

Joined
Sat Sep 28, 2013 12:58 am

Post by straightlight » Sat Aug 06, 2016 6:42 pm

Hi chintorwebs,

which OC version are you using?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chintorwebs » Sat Aug 06, 2016 6:55 pm

Am using 2.2

But in the same demo opencart also the same issue i think.

When u click "write a review", the review form opens but we have to scroll down to the form manually.

Check the opencart demo product link

http://demo.opencart.com/index.php?rout ... duct_id=42

When we click write review, it should jump back to review form...That's all I need!

New member

Posts

Joined
Sat Sep 28, 2013 12:58 am

Post by straightlight » Sat Aug 06, 2016 7:11 pm

chintorwebs wrote:Am using 2.2

But in the same demo opencart also the same issue i think.

When u click "write a review", the review form opens but we have to scroll down to the form manually.

Check the opencart demo product link

http://demo.opencart.com/index.php?rout ... duct_id=42

When we click write review, it should jump back to review form...That's all I need!
This is the message I see when submitting as it remains on the same tab in the page:
Thank you for your review. It has been submitted to the webmaster for approval.
Could you demonstrate a screenshot of what your browser does when posting since you claim not being able to remain on the same tab after posting the review?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chintorwebs » Sat Aug 06, 2016 7:42 pm

I can post review, this is not an issue. When u see my site, click write review it stays same place. Actually it opens the form, but it shouldn't go to review form. We have to scrollout manually.

The demo also work like that only, it opens the form but it doesn't jum down to review form automatically.

If the "write review" on very top of the page and review tab is bottom of the page u will see the issue on any opencart site like my site.

New member

Posts

Joined
Sat Sep 28, 2013 12:58 am

Post by straightlight » Sat Aug 06, 2016 7:51 pm

If the review is on approval process, the review won't be posted until approved which means the pointer won't be able to scroll-down automatically to that review.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chintorwebs » Sat Aug 06, 2016 7:59 pm

No, u didn't understand what i mean.

Did u checked my link, u know the issue.


http://www.zazmar.co.uk/index.php?route ... duct_id=50

Click "write review" below order button. It stays on same place instead of jumping down to review form.

In any product page if the write review is on very top and description, review tab is very bottom like my site then u will face same issue.

There's no problem in posting review... The issue is not jumping down to review form.

New member

Posts

Joined
Sat Sep 28, 2013 12:58 am

Post by straightlight » Sat Aug 06, 2016 8:34 pm

The following changes will fix this issue for the default theme. This was, indeed, a long time reported issue. As for your custom theme, you'd have the find the corresponding lines or to contact the theme developer to implement this for you. These changes are focusing on all div elements in the page to where the browser will scroll automatically into.

In catalog/view/theme/default/template/product/product.tpl file,

replace:

Code: Select all

$(document).ready(function() {
	$('.thumbnails').magnificPopup({
		type:'image',
		delegate: 'a',
		gallery: {
			enabled:true
		}
	});
});
with:

Code: Select all

$(document).ready(function() {
	$('.thumbnails').magnificPopup({
		type:'image',
		delegate: 'a',
		gallery: {
			enabled:true
		}
	});
	
	$('a[href^="#"]').bind('click.smoothscroll',function (e) {
        e.preventDefault();
        var target = this.hash,
        $target = $(target);

        $('html, body').stop().animate( {
            'scrollTop': $target.offset().top
        }, 100, 'swing', function () {
            window.location.hash = target;
        } );
    });
});
Then, refresh your product page. This should resolved the problem.

Source: http://stackoverflow.com/questions/6677 ... to-element

I will move this topic into the concepts section of the forum. This addition should definitely be part of the core.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sat Aug 06, 2016 9:11 pm

If you do not want to show the anchor on the URL, for SEO purposes,

replace:

Code: Select all

window.location.hash = target;
with:

Code: Select all

//window.location.hash = target;
in the code above. However, you may have to click twice on the tabs per page redirection or on page refresh.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chintorwebs » Sat Aug 06, 2016 9:45 pm

Yes, u got my point. Thanks so much for your help. Yes, this is what i need.

Now i need to double click, then only it works.


Is there anyway to have this feature by single click.

New member

Posts

Joined
Sat Sep 28, 2013 12:58 am

Post by straightlight » Sat Aug 06, 2016 10:57 pm

Yes, u got my point. Thanks so much for your help. Yes, this is what i need.

Now i need to double click, then only it works.
No problem. :)
Is there anyway to have this feature by single click.
So far, there are no definite solution that has been either posted or found, both working together, on the forum on this one, unfortunately.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chintorwebs » Sat Aug 06, 2016 11:11 pm

Is this known bug to implement in opencart core?

Because its must have feature.

Anyway, thanks for your help.

New member

Posts

Joined
Sat Sep 28, 2013 12:58 am

Post by straightlight » Sat Aug 06, 2016 11:15 pm

chintorwebs wrote:Is this known bug to implement in opencart core?

Because its must have feature.

Anyway, thanks for your help.
It wouldn't really be quite considered a bug but rather an implemented feature that should be used as part of the core since it does not prevent the same or other functionality to respond from the mouse click event which is why I moved this topic to the concepts section of the forum. :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chintorwebs » Sat Aug 06, 2016 11:19 pm

Okay, that's great! :)

New member

Posts

Joined
Sat Sep 28, 2013 12:58 am
Who is online

Users browsing this forum: No registered users and 3 guests