The oc_facebook add background data to the page that facebook can easily read. This is called open graph data more info: http://developers.facebook.com/docs/opengraph/hbg wrote:Hi, I have uploaded the oc_facebook.xml file, but I haven't seen any sign of the facebook like icon. I did generate the like button, but I am unsure where to place it.
Advanced Professional Email Template
Customers Pre-Sale. Inc abandoned cart email
Order Follow-Up Email. Inc request review
Email Validation with ZeroBounce
Can someone please help with integrate the oc_facebook.xml file into my website?
Not sure that I understand what modifications need to be made to the oc_facebook.xml file?
Instructions say...
"Update the 'USER_ID' in the .xml to your facebook ID."
1) Where do I get my Facebook ID?
2) Is my Facebook ID my email address that I use for my Facebook Account?
3) Do I just replace the literal USER_ID in the xml file with my email address?
Thank you for your help.
Not sure that I understand what modifications need to be made to the oc_facebook.xml file?
Instructions say...
"Update the 'USER_ID' in the .xml to your facebook ID."
1) Where do I get my Facebook ID?
2) Is my Facebook ID my email address that I use for my Facebook Account?
3) Do I just replace the literal USER_ID in the xml file with my email address?
Thank you for your help.
Hi, VQMod wasn't properly installed. I have installed the latest version, but had an error come up at the top of the page. Notice: Undefined index: image in /home/homebrew/public_html/opencart/shop/vqmod/vqcache/vq-catalog_controller_product_product.php on line 359 is the error I have been receiving
Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/
HI, I am using OpenCart v1.5.0.5, and have installed the vQmod xml file. And I can't see the "Like" button.
My questions:
1. What is the procedure to turn on the "Like" button?
2. I have enable the Use SEO URL's: and it advices me to rename the htaccess.txt to .htaccess. which I did and caused internal server problem 500. (and I managed to switch it back)
Appreciate if anyone could give me right direction
Thanks
My questions:
1. What is the procedure to turn on the "Like" button?
2. I have enable the Use SEO URL's: and it advices me to rename the htaccess.txt to .htaccess. which I did and caused internal server problem 500. (and I managed to switch it back)
Appreciate if anyone could give me right direction
Thanks
Hi, I am using this one from facebook.
http://developers.facebook.com/docs/ref ... gins/like/#
Cut and paste the code to heading.tpl and product.tpl in catalog/view/template/my template/etc....
I hope it is useful to you guys !
Shaw
http://developers.facebook.com/docs/ref ... gins/like/#
Cut and paste the code to heading.tpl and product.tpl in catalog/view/template/my template/etc....
I hope it is useful to you guys !
Shaw
There seems to be quite a bit of confusion over using this on v1.5.1 so I will copy my files here and add instructions to setting this up. My method improves on the vqmod kindly provided earlier by opencart-templates.
1)
create an xml file and paste the following code into it:
The vqmod file above now contains a missing item that was causing errors once connected to FB. It also modifies the product.tpl using vqmod to actually show the button. You will need to search and replace the following items in the above code:
FIND:
'YOUR_TEMPLATE'
Change this to the name of your template (default etc)
FIND:
$this->document->addFBMeta('og:admins','xxxxxxxxxxxxxxx');
$this->document->addFBMeta('fb:admins','xxxxxxxxxxxxxxx');
Change xxxxxxxxxxxxxxx to match your Facebook User ID.
(To find yourfacebook user id, log into facebook and hover your mouse over your profile page. In the status bar at the bottom you will see a link that contains your NUMERICAL facebook user id. Enter this into the lines above.)
Upload the xml file to the vqmod>xml folder and then open your site in your browser. (the file currently puts the fb like buttons at the bottom of the product description but you can change this to any location you prefer.)
At this stage you will see the 'fb like' image but will get an error when trying to use it. To get rid of this error do the following:
Log into your facebook account and go to: http://developers.facebook.com/setup/
You will be presented with 3 fields to complete:
Site name: Put your site name here
Site URL: Put your domain name here in the following format: http://domain.co.uk/
Locale:Select your locale.
Click create app button and get Access Token.
Log back out of facebook and then try your new button.
Follow the steps above and this will work.
PS: You can check for errors on your product page by visiting the following url and entering the url for the product you are testing. http://developers.facebook.com/tools/debug
Enjoy.
1)
create an xml file and paste the following code into it:
<modification>
<id>Facebook Meta</id>
<version>1.0.0</version>
<vqmver>1.0.8</vqmver>
<date>14/07/2011</date>
<author>Opencart-templates.co.uk</author>
<file name="catalog/view/theme/YOUR_TEMPLATE/template/common/header.tpl">
<operation>
<search position="before">
<![CDATA[</head>]]></search>
<add><![CDATA[
<fb:share-button class="meta">
<meta name="medium" content="mult"/>
<?php foreach ($this->document->getFBMeta() as $fbMeta) { ?>
<meta property="<?php echo $fbMeta['property'] ?>" content="<?php echo $fbMeta['content']; ?>" />
<?php } ?>
</fb:share-button>
]]></add>
</operation>
</file>
<file name="catalog/controller/product/product.php">
<operation>
<search position="before">
<![CDATA[if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {]]></search>
<add><![CDATA[
$this->document->addFBMeta('og:title', $this->data['heading_title']);
$this->document->addFBMeta('og:url',$this->url->link('product/product', 'product_id=' . $this->request->get['product_id']));
$this->document->addFBMeta('og:type', 'product');
$this->document->addFBMeta('og:image', $this->data['thumb'] );
$this->document->addFBMeta('og:image', $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')) );
$this->document->addFBMeta('og:site_name', $this->config->get('config_name'));
$this->document->addFBMeta('og:admins','xxxxxxxxxxxxxxx');
$this->document->addFBMeta('fb:admins','xxxxxxxxxxxxxxx');
if($this->config->get('config_address')){$this->document->addFBMeta('og:street-address',$this->config->get('config_address'));}
if($this->config->get('config_email')){$this->document->addFBMeta('og:email',$this->config->get('config_email'));}
if($this->config->get('config_telephone')){$this->document->addFBMeta('og:phone_number',$this->config->get('config_telephone'));}
if($this->config->get('config_fax')){$this->document->addFBMeta('og:fax_number',$this->config->get('config_fax'));}
]]></add>
</operation>
</file>
<file name="system/library/document.php">
<operation>
<search position="after">
<![CDATA[private $scripts = array();]]></search>
<add><![CDATA[public $fbMeta = array();]]></add>
</operation>
<operation>
<search position="before">
<![CDATA[public function getStyles() {]]></search>
<add><![CDATA[
public function addFBMeta($property , $content ) {
$this->fbMeta[] = array(
'property' => $property,
'content' => $content
);
}
public function getFBMeta () {
return $this->fbMeta;
}
]]></add>
</operation>
</file>
<file name="catalog/view/theme/YOUR_TEMPLATE/template/product/product.tpl">
<operation>
<search position="after">
<![CDATA[<div id="tab-description" class="tab-content"><?php echo $description; ?></div>]]></search>
<add><![CDATA[
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.j ... t><fb:like href="" send="true" width="450" show_faces="true" action="like" font=""></fb:like>
]]></add>
</operation>
</file>
</modification>
The vqmod file above now contains a missing item that was causing errors once connected to FB. It also modifies the product.tpl using vqmod to actually show the button. You will need to search and replace the following items in the above code:
FIND:
'YOUR_TEMPLATE'
Change this to the name of your template (default etc)
FIND:
$this->document->addFBMeta('og:admins','xxxxxxxxxxxxxxx');
$this->document->addFBMeta('fb:admins','xxxxxxxxxxxxxxx');
Change xxxxxxxxxxxxxxx to match your Facebook User ID.
(To find yourfacebook user id, log into facebook and hover your mouse over your profile page. In the status bar at the bottom you will see a link that contains your NUMERICAL facebook user id. Enter this into the lines above.)
Upload the xml file to the vqmod>xml folder and then open your site in your browser. (the file currently puts the fb like buttons at the bottom of the product description but you can change this to any location you prefer.)
At this stage you will see the 'fb like' image but will get an error when trying to use it. To get rid of this error do the following:
Log into your facebook account and go to: http://developers.facebook.com/setup/
You will be presented with 3 fields to complete:
Site name: Put your site name here
Site URL: Put your domain name here in the following format: http://domain.co.uk/
Locale:Select your locale.
Click create app button and get Access Token.
Log back out of facebook and then try your new button.
Follow the steps above and this will work.
PS: You can check for errors on your product page by visiting the following url and entering the url for the product you are testing. http://developers.facebook.com/tools/debug
Enjoy.
Ooops slight error with positioning of the fb button in the above example.
Find:
and replace with:
Find:
Code: Select all
<file name="catalog/view/theme/YOUR_TEMPLATE/template/product/product.tpl">
<operation>
<search position="after">
<![CDATA[<div id="tab-description" class="tab-content"><?php echo $description; ?></div>]]></search>
<add><![CDATA[
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="true" width="450" show_faces="true" action="like" font=""></fb:like>
]]></add>
</operation>
</file>
Code: Select all
<file name="catalog/view/theme/YOUR_TEMPLATE/template/product/product.tpl">
<operation>
<search position="replace">
<![CDATA[<?php echo $content_bottom; ?></div>]]>
</search>
<add>
<![CDATA[
<?php echo $content_bottom; ?><br /><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="true" width="450" show_faces="true" action="like" font=""></fb:like></div>
]]>
</add>
</operation>
</file>
The original xml file adds a FB Button and 'Share' link at the top left of the page which I didn't want in my template so to remove it:
Find:
and replace with:
Find:
Code: Select all
<file name="catalog/view/theme/YOUR_TEMPLATE/template/common/header.tpl">
<operation>
<search position="before">
<![CDATA[</head>]]></search>
<add><![CDATA[
<fb:share-button class="meta">
<meta name="medium" content="mult"/>
<?php foreach ($this->document->getFBMeta() as $fbMeta) { ?>
<meta property="<?php echo $fbMeta['property'] ?>" content="<?php echo $fbMeta['content']; ?>" />
<?php } ?>
</fb:share-button>
]]></add>
</operation>
</file>
Code: Select all
<file name="catalog/view/theme/YOUR_TEMPLATE/template/common/header.tpl">
<operation>
<search position="before">
<![CDATA[</head>]]></search>
<add><![CDATA[
<meta name="medium" content="mult"/>
<?php foreach ($this->document->getFBMeta() as $fbMeta) { ?>
<meta property="<?php echo $fbMeta['property'] ?>" content="<?php echo $fbMeta['content']; ?>" />
<?php } ?>
]]></add>
</operation>
</file>
I get "Warning: VQMod XML syntax does not appear to be valid!" when I try to use this.
Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Sounds like a typo somewhere.
Try this:
Try this:
Code: Select all
<modification>
<id>Facebook Meta</id>
<version>1.0.0</version>
<vqmver>1.0.8</vqmver>
<date>14/07/2011</date>
<author>Opencart-templates.co.uk</author>
<file name="catalog/controller/product/product.php">
<operation>
<search position="before">
<![CDATA[if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/product.tpl')) {]]></search>
<add><![CDATA[
$this->document->addFBMeta('og:title', $this->data['heading_title']);
$this->document->addFBMeta('og:url',$this->url->link('product/product', 'product_id=' . $this->request->get['product_id']));
$this->document->addFBMeta('og:type', 'product');
$this->document->addFBMeta('og:image', $this->data['thumb'] );
$this->document->addFBMeta('og:image', $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')) );
$this->document->addFBMeta('og:site_name', $this->config->get('config_name'));
$this->document->addFBMeta('og:admins','xxxxxxxxxxxxxxx');
$this->document->addFBMeta('fb:admins','xxxxxxxxxxxxxxx');
if($this->config->get('config_address')){$this->document->addFBMeta('og:street-address',$this->config->get('config_address'));}
if($this->config->get('config_email')){$this->document->addFBMeta('og:email',$this->config->get('config_email'));}
if($this->config->get('config_telephone')){$this->document->addFBMeta('og:phone_number',$this->config->get('config_telephone'));}
if($this->config->get('config_fax')){$this->document->addFBMeta('og:fax_number',$this->config->get('config_fax'));}
]]></add>
</operation>
</file>
<file name="system/library/document.php">
<operation>
<search position="after">
<![CDATA[private $scripts = array();]]></search>
<add><![CDATA[public $fbMeta = array();]]></add>
</operation>
<operation>
<search position="before">
<![CDATA[public function getStyles() {]]></search>
<add><![CDATA[
public function addFBMeta($property , $content ) {
$this->fbMeta[] = array(
'property' => $property,
'content' => $content
);
}
public function getFBMeta () {
return $this->fbMeta;
}
]]></add>
</operation>
</file>
<file name="catalog/view/theme/default/template/common/header.tpl">
<operation>
<search position="before">
<![CDATA[</head>]]></search>
<add><![CDATA[
<meta name="medium" content="mult"/>
<?php foreach ($this->document->getFBMeta() as $fbMeta) { ?>
<meta property="<?php echo $fbMeta['property'] ?>" content="<?php echo $fbMeta['content']; ?>" />
<?php } ?>
]]></add>
</operation>
</file>
<file name="catalog/view/theme/default/template/product/product.tpl">
<operation>
<search position="replace">
<![CDATA[<?php echo $content_bottom; ?></div>]]>
</search>
<add>
<![CDATA[
<?php echo $content_bottom; ?><br /><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="true" width="450" show_faces="true" action="like" font=""></fb:like></div>
]]>
</add>
</operation>
</file>
</modification>
Hi guys,
I had installed this mod on my v.1.4.7 website but now, after upgrading to 1.4.9.6 the button is missing.
Can some one pass me the eact code I have to add (and where) for the v.1.4.9.6?
Many thanks!
I had installed this mod on my v.1.4.7 website but now, after upgrading to 1.4.9.6 the button is missing.
Can some one pass me the eact code I have to add (and where) for the v.1.4.9.6?
Many thanks!
v. 1.4.9.6 & v. 2.0.2.0
Hey try out the new HTML5 code. It seems to be working.
https://developers.facebook.com/docs/re ... gins/like/
https://developers.facebook.com/docs/re ... gins/like/
i would also like to get this to work with 1.5.1.3
I am getting the following error
Notice: Undefined index: image in /vqmod/vqcache/vq2-catalog_controller_product_product.php on line 357
The button does appear at the bottom of the page.
I am getting the following error
Notice: Undefined index: image in /vqmod/vqcache/vq2-catalog_controller_product_product.php on line 357
The button does appear at the bottom of the page.
I have been playing around with this, and I have go this far , first go to http://developers.facebook.com/docs/ref ... gins/like/ where you can get the code in either HTML5 IFRAME or XFBML.
You ca place the code in any tpl file in catalog/view/theme/default/template/common, and as long as there are no css stylesheets attached then all the buttons are active and clickable.
Once I add
#facebook {
position: absolute;
top: 10px; /* JH Changed for Currency position */
left: 500px;
}
Then the buttons stop being active, although the like numbers are returned.
This is as far as I can go, anybody know how to sort out the links so they are clickable?
Cheers
Jimmy
You ca place the code in any tpl file in catalog/view/theme/default/template/common, and as long as there are no css stylesheets attached then all the buttons are active and clickable.
Once I add
#facebook {
position: absolute;
top: 10px; /* JH Changed for Currency position */
left: 500px;
}
Then the buttons stop being active, although the like numbers are returned.
This is as far as I can go, anybody know how to sort out the links so they are clickable?
Cheers
Jimmy
Hi I have solved this on our site, I add the following code
Use you FB id, href and twitter name, and place the code where you want in
catalog/view/theme/YOUR THEME/template/common/header.tpl
I then added the following to my stylesheet
Obviously you will need to make changes to suit your store.
I know very little about coding, and managed this with a bit of trial and error, I hope it is useful to someone.
Jimmy
Code: Select all
<div id="facebook">
<div id="fb-root"></div><script src="//connect.facebook.net/en_US/all.js#appId=YOUR ID;xfbml=1">
</script><fb:like href="scootssuitsandboots.com" send="true" width="75" show_faces="false" font=""></fb:like></div>
<div id="twitter">
<a target="_blank" href="http://twitter.com/scootsuitsboots" title="Follow Scoots Suits and Boots on twitter"><img alt="" src="catalog/view/theme/default/image/followme.png"/></a>
</div>
</php>
catalog/view/theme/YOUR THEME/template/common/header.tpl
I then added the following to my stylesheet
Code: Select all
div#twitter{
position: absolute;
top: 02px; /* CHANGED BY JH */
right:460px; /* CHANGED BY JH */
z-index: 0;
}
#header #facebook {
background: url('//connect.facebook.net/en_US/all.js#appId=[b]YOUR ID[/b]&xfbml=1') center center no-repeat;
position: absolute;
top: 07px; /* CHANGED BY JH */
right: 530px; /* CHANGED BY JH */
z-index: 0;
}
I know very little about coding, and managed this with a bit of trial and error, I hope it is useful to someone.
Jimmy
Who is online
Users browsing this forum: No registered users and 76 guests