Post by shivanraptor » Tue Apr 22, 2014 6:36 pm

How can I make a clickable Product Code in Product page?


For example, the product code is 123, I wish users can go to http://www.example.com/product/123

Which file should I change?

Newbie

Posts

Joined
Sun Apr 06, 2014 10:35 am

Post by jty » Tue Apr 22, 2014 10:21 pm

Not sure what you really mean here.
If you are already on the product page, why would you want the product code clickable? Wouldn't you just be clicking to return to the same page?
If you mean you want a product code on a "category" page for a product, and you want that model code to click to a product page, then you need to modify category.tpl. Have a look at "name" on the category page and use that code to wrap around model

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by shivanraptor » Tue Apr 22, 2014 11:25 pm

No. The example.com I mention here is an external link to other domain, e.g. a library website with book ID as query parameter

Newbie

Posts

Joined
Sun Apr 06, 2014 10:35 am

Post by Axansh » Wed Apr 23, 2014 1:49 am

You can to create seo keywords like this.

Thanks and Best Regards,
Axansh Sheth

Our Opencart Module
All in ONE SEO |
Multi-purpose pop |
Restaurant theme |
Store time save module


User avatar
Active Member

Posts

Joined
Mon Feb 06, 2012 3:07 pm

Post by pprmkr » Wed Apr 23, 2014 1:14 pm

shivanraptor wrote:No. The example.com I mention here is an external link to other domain, e.g. a library website with book ID as query parameter
Edit catalog/view/theme/YOUR_THEME/template/product/product.tpl

Find:

Code: Select all

<?php echo $model; ?>
Change into:

Code: Select all

<a href="http://example.com/product/<?php echo $model; ?>" target="_blank" title="<?php echo $heading_title; ?>"><?php echo $model; ?></a>

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by shivanraptor » Thu Apr 24, 2014 6:04 pm

That's exactly what I want ! Thanks a million !

Newbie

Posts

Joined
Sun Apr 06, 2014 10:35 am
Who is online

Users browsing this forum: Google [Bot] and 60 guests