In the code I need to add the page URL, but what do I put?
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Code: Select all
<?php echo $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id='.$this->request->get['product_id']); ?>
If anyone else wants to add the Facebook Like Button to their Opencart Store Follow the Following Instructions:
Requirements:
- SEO URLs Must be Enabled
Instructions:
Edit the file: catalog/view/theme/default/template/product/product.tpl
Find this piece of code:
Code: Select all
</table>
<br />
<?php if ($display_price) { ?>
Code: Select all
<div style="width: 100%; padding-top:10px;">
<table>
<tr>
<td><iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id='.$this->request->get['product_id']); ?>&layout=standard&show_faces=false&width=280&action=like&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:270px; height:35px;" allowTransparency="true"></iframe>
</td>
</tr>
</table>
</div>
Let me know if you find any problems
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/
http://www.dyelyfe.com/Store
Are you sure you are editing the right file?InfiniteDezigns wrote:This did not work for me. It won't show up. I'm using OC 1.4.9. Here's the URL:
http://www.dyelyfe.com/Store
Also you site seems really really slow to me, might want to work on the speed.
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Edit the file: catalog/view/theme/default/template/product/product.tpl
I pasted the code above and it won't show up. This site is a work in progress so speed is not a siiue now. Just trying to get the kinks out first.
Just searched your source code and its not even showing there so you must be doing something wrong.InfiniteDezigns wrote:Yeah I'm sure. The directions are to edit this page:
Edit the file: catalog/view/theme/default/template/product/product.tpl
I pasted the code above and it won't show up. This site is a work in progress so speed is not a siiue now. Just trying to get the kinks out first.
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
If you have a custom theme (as you do) you need to change :
catalog/view/theme/default/template/product/product.tpl
into
catalog/view/theme/YOURTHEME/template/product/product.tpl
(i.e - catalog/view/theme/dyelyfe/template/product/product.tpl)
Once this is done it should then show.
You need to enable SEO Urls and also give the products keywords.InfiniteDezigns wrote:Ok I got it to show up. But now it doesn't show or calculate how many people like the product. It also doesn't show up on facebook newsfeed or profile page at all.
To show faces you need to edit the facebook code, look for show_faces=false and change to show_faces=true
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Your products to not have SEO urls, look at this url:InfiniteDezigns wrote:Nope. still doesn't show how many people like nor does it post to their page. and everything has keywords and the seo urls is active.
http://dyelyfe.com/Store/index.php?rout ... uct_id=102
then compare to this one:
http://www.stylemyapple.co.uk/ipad-acce ... pad-itouch
That is your problem.
10% Discount on all Shared and Reseller Hosting Packages at Vidahost.com
Discount Code: DISCOUNT10
Enabled the SEO kewords but then the products are not showing.
v.1.4.9.1
I have put the code in and the facebook like button shows up fine. but when I press the like button I get the following appear on Facebook: Mark likes Product not found! on party-kits.com. I have tried putting an SEO keyword in but it is not making any difference. any ideas what could be wrong?
Thank You :-)
Users browsing this forum: No registered users and 5 guests