Post by unknownmale1 » Sat Jul 23, 2011 5:15 am

[quote][/quote]

Active Member

Posts

Joined
Sat Aug 28, 2010 6:46 pm

Post by opencart-templates » Tue Aug 09, 2011 12:24 am

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.
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/

Advanced Professional Email Template
Customers Pre-Sale. Inc abandoned cart email
Order Follow-Up Email. Inc request review
Email Validation with ZeroBounce


User avatar
Active Member

Posts

Joined
Mon May 16, 2011 7:24 pm
Location - UK

Post by Brook » Tue Aug 09, 2011 8:46 pm

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.

Active Member

Posts

Joined
Wed Feb 24, 2010 12:15 am

Post by tokorakyat » Fri Aug 12, 2011 9:00 am

Thanks for the best trick..

I Very like this post...


Successfull at My Online Shop

Image


Newbie

Posts

Joined
Mon May 02, 2011 3:16 am

Post by hbg » Fri Aug 12, 2011 3:32 pm

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/


User avatar
hbg
Active Member

Posts

Joined
Wed Apr 13, 2011 8:52 am
Location - Newcastle NSW Australia

Post by shawtham » Mon Aug 22, 2011 11:30 pm

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

Newbie

Posts

Joined
Fri Jul 22, 2011 10:29 pm

Post by shawtham » Tue Aug 23, 2011 6:14 pm

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

Newbie

Posts

Joined
Fri Jul 22, 2011 10:29 pm

Post by asphole » Sat Aug 27, 2011 12:25 am

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:
<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.

Active Member

Posts

Joined
Mon Mar 14, 2011 9:33 am

Post by asphole » Sat Aug 27, 2011 12:32 am

I also believe this wont work on facebook fan pages. The facebook user id must be from a personal facebook profile.

Active Member

Posts

Joined
Mon Mar 14, 2011 9:33 am

Post by asphole » Sat Aug 27, 2011 3:01 am

Ooops slight error with positioning of the fb button in the above example.

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>
and replace with:

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>

Active Member

Posts

Joined
Mon Mar 14, 2011 9:33 am

Post by asphole » Sat Aug 27, 2011 3:41 am

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:

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>
and replace with:

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>

Active Member

Posts

Joined
Mon Mar 14, 2011 9:33 am

Post by labeshops » Fri Sep 09, 2011 2:21 am

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.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by asphole » Fri Sep 09, 2011 2:50 am

Sounds like a typo somewhere.

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>

Active Member

Posts

Joined
Mon Mar 14, 2011 9:33 am

Post by Joxe » Sun Oct 23, 2011 4:03 am

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!

v. 1.4.9.6 & v. 2.0.2.0


Active Member

Posts

Joined
Wed Apr 28, 2010 6:12 am

Post by kathatp » Thu Nov 03, 2011 10:48 am

Hey try out the new HTML5 code. It seems to be working.

https://developers.facebook.com/docs/re ... gins/like/

Newbie

Posts

Joined
Mon Jul 25, 2011 11:12 am

Post by Melanie » Fri Dec 30, 2011 12:00 am

Has anyone got a way to get this working for 1.5.1.3


Thanks a lot.

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by jimmyharwood » Sat Jan 07, 2012 2:15 am

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.

New member

Posts

Joined
Thu Dec 29, 2011 12:55 am

Post by jimmyharwood » Sat Jan 07, 2012 7:47 pm

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

New member

Posts

Joined
Thu Dec 29, 2011 12:55 am

Post by jimmyharwood » Sun Apr 29, 2012 2:27 am

Hi I have solved this on our site, I add the following code

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>
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

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;
	}
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.
;D

Jimmy

New member

Posts

Joined
Thu Dec 29, 2011 12:55 am

Post by mrjave » Mon Aug 13, 2012 3:06 pm

Good day all,

is this available in VQMOD and for V1.5.3.1??
someone pleaseeee.

kind regards,
Jave

Active Member

Posts

Joined
Wed Jun 13, 2012 4:22 pm
Who is online

Users browsing this forum: No registered users and 76 guests