Post by takayuki » Tue Apr 24, 2012 9:47 am

I've noticed that the "add to cart" links in OC 1.4.9.4 use javascript links. Is it ok to use a more simple link like this?:

Code: Select all

<a class="button" href="http://myopencartsite.com/index.php?route=checkout/cart&product_id=<?php echo $product_id; ?>" title="Add to Cart" ><span>add to cart</span></a>
Are the javascript add to cart links there for a reason? for example, preventing search engine crawlers from going to the checkout, etc.??

thanks,

takayuki

New member

Posts

Joined
Thu Aug 13, 2009 10:16 pm

Post by Tcalp » Tue Apr 24, 2012 10:50 am

Yes links like that are fine, I would add a rel="nofollow" for search engines though. It is done like that as 'add to cart' is typically an ajax post (not requiring a page reload) ~~ doesn't need to be done that way though.

Increase Page Speed (#1 rated commercial extension on OpenCart Marketplace)
15in1 Essential Extensions Value Pack Premium Customer Testimonials Reward Points Extended Admin Security Lockdown Suite

Image
irc.freenode.net #opencart


User avatar
Active Member

Posts

Joined
Wed Jul 06, 2011 1:49 pm
Who is online

Users browsing this forum: No registered users and 60 guests