Post by Nija » Tue Nov 23, 2010 4:33 pm

It works for me.
Thx verry much !

Active Member

Posts

Joined
Sun Oct 31, 2010 5:19 pm
Location - Constanta, Romana

Post by rasyid » Wed Dec 29, 2010 9:38 am

I am so happy.. my first mod and it work...

Newbie

Posts

Joined
Wed Dec 29, 2010 9:36 am

Post by daymobrew » Fri Jan 28, 2011 8:33 pm

I recently added a Facebook Like Button to my product page. I used the FBLB extension (which just includes a modifiy product.tpl file).

Instead of modifying a core file I wrote a vQmod xml file to make the change virtually. It is using Qphoria's excellent vQmod module, with support thread on this board.

You can download the facebook like button xml file from my web site. I have attached it to this post too - just rename .xml.txt to .xml before uploading it to your vqmod/xml directory.

Attachments

vQmod xml file for Facebook Like Button extension.


New member

Posts

Joined
Wed Dec 22, 2010 7:36 am

Post by jcgadgets » Sat Jan 29, 2011 5:22 pm

Did anyone ever get this whole thing fully figured out, with no errors and everything working 100%? I would use Q's vmod tool but...to be honest I am lucky to have gotten as far as I have, and don't dare play with things that I don't really understand :S

On another note...
CEOself wrote:When I turn on the SEO URLs everything goes out the window. The product pages run to "Page Not Found". I have multiple SEO keywords in for each item. They are separated by commas. Any ideas of what I am doing wrong?
I'm not sure if you're still watching this thread or if you've figured out the problem, but the SEO keywords will actually constitute your URL, hence you cannot have commas in that field. If you're selling an Apple iPhone, you would not want to enter "apple,iphone" in the keywords box, you would want to enter "Apple-iPhone", which would generate a product URL like yourstore.com/Apple-iPhone




Thank you,
Jared

Active Member

Posts

Joined
Sun Oct 31, 2010 4:49 pm

Post by d3z1gnr » Sat Feb 05, 2011 8:11 am

hi guys,

can someone let me know the required if statement to prevent my like button from appearing on the page if the client HAS NOT entered an seo keyword.

this works really well, just have a very lazy client! haha. ;)

mike

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand

Post by dry_flood » Mon Feb 07, 2011 5:56 am

musicofthehart wrote:I did NOT have SEO URLS enabled, I am sure that was my problem, but now I have opened up a whole new can of worms since I turned that on.... all of my pages are not found. I am sure it has to do with the fact that I am using godady hosting. Ill try to figure out this problem and get back to you. Great mod btw... and I am sure it works once I get my new problem fixed.
Install VQMod and use this VQScript http://forum.opencart.com/viewtopic.php ... 25#p132625

New member

Posts

Joined
Tue Dec 14, 2010 4:33 am

Post by nick the geek » Sun Feb 13, 2011 8:07 pm

worked a treat straight off of the page

thank you very much

Newbie

Posts

Joined
Sat Apr 03, 2010 6:35 am

Post by vang » Sat Feb 19, 2011 1:05 am

sketchi wrote:The Facebook Like iframe works for me (running OpenCart 1.4.9.2) but the wrong product image is displayed in my Facebook feed. Any ideas how to fix?

Edit: I think what's needed is an Open Graph meta tag with the correct image path, so I've tried entering this into header.tpl, but I don't get it to display the thumb:

Code: Select all

<?php if ($thumb) { ?>
<meta property="og:image" content="<?php echo $thumb; ?>" />
<?php } ?>
Did anyone happen to figure out a solution to this issue?
This is what I have for the opengraph protocol in my header, but the only thing I can't get to work is the image.

Code: Select all

<meta property="og:title" content="<?php echo $title; ?>" />
<meta property="og:site_name" content="COMPANY NAME" />
<meta property="og:image" content="<?php echo $product['image']; ?>" />
<meta property="og:type" content="product" />
<meta property="og:url" content="<?php echo $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id='.$this->request->get['product_id']); ?>" />
<meta property="og:description" content="<?php echo $description; ?>" />
<meta property="fb:app_id" content="MY_APP_ID" /> 
How do we call the url to the main product image dynamically?
Everything I put there such as <?php echo $thumb; ?> or <?php echo $image; ?> doesn't work.

Code: Select all

<meta property="og:image" content="<?php echo $product['image']; ?>" />
The retrieval is accomplished somewhere else?
How would we call the main image by itself?
BTW, everything else works fine, the call to the image is the only thing that breaks.

Thanks in advance.

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by vang » Sun Feb 20, 2011 3:29 pm

No one can offer up anything? Please. Pretty please. ;)

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by d3z1gnr » Sun Feb 27, 2011 7:34 am

d3z1gnr wrote:hi guys,

can someone let me know the required if statement to prevent my like button from appearing on the page if the client HAS NOT entered an seo keyword.

this works really well, just have a very lazy client! haha. ;)

mike
Really hoping someone can help me with?

Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz


User avatar
Active Member

Posts

Joined
Mon Jan 18, 2010 2:59 pm
Location - Auckland, New Zealand

Post by vang » Sun Feb 27, 2011 1:44 pm

d3z1gnr wrote:
d3z1gnr wrote:hi guys,

can someone let me know the required if statement to prevent my like button from appearing on the page if the client HAS NOT entered an seo keyword.

this works really well, just have a very lazy client! haha. ;)

mike
Really hoping someone can help me with?
Is this what you need? I'm not really sure, but it might work for you.

Code: Select all

<?php if ($keywords) { ?>
Whatever you want to put here
<?php } ?>
I'm not sure if the keywords meta tag will even display unless you actually insert keywords into your product. ???
See if this helps.

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by vang » Sun Mar 06, 2011 12:29 pm

Since I couldn't ever get an answer, I had to think outside of the box a little and rig something up.

Code: Select all

<meta property="og:image" content="http://www.MY_DOMAIN.com/catalog/view/theme/MY_TEMPLATE/image/fb/<?php echo $title; ?>.jpg"/>
What I ended up doing is creating an /fb/ directory and creating new image files using the product title for the image name. Then put these images in the new /fb/ directory. The only thing I don't like about this solution is I have spaces in my titles. Therefore, there are spaces in the image name, which will probably cause problems somewhere? IE? ???

What would be ideal for me is to use the SKU as the image name, since I used the SKU to name all my product images.
I'm thinking about adding "Q's" vQmod and integrating the SKU mod, then try to pull the SKU instead of the Title.
I don't know if this will work either. It'll probably end up being another situation like the <?php echo $product['image']; ?> problem.
I believe I need to install the vQmod anyway. It looks pretty cool and makes sense.

Anyhow, I hope this helps a little.
I know it is probably a "crazy" way of getting it done, but it works. At least on my end. ;)
I was desperate, so I had to get creative. ;D

This is how I have my opengraph tags setup:

Code: Select all

<meta property="og:title" content="<?php echo $title; ?>"/>
<meta property="og:site_name" content="MY_SITE_NAME"/>
<meta property="og:image" content="http://www.MY_DOMAIN.com/catalog/view/theme/MY_TEMPLATE/image/fb/<?php echo $title; ?>.jpg"/>
<meta property="og:type" content="product"/>
<meta property="og:url" content="<?php echo $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id='.$this->request->get['product_id']); ?>"/>
<meta property="og:description" content="<?php echo $description; ?>"/>
Go to my site and like a product and see for yourself.
You can always unlike it.

If the whole SKU idea works I'll let you know.

You know, what still bugs me though is that <?php echo $product['image']; ?> doesn't work. I guess it is pulling a gallery of images and won't work as is? I dunno. ???

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by philbydevil » Mon Mar 07, 2011 5:46 am

Nice website vang!

I've just been introduced to this site: AddThis - http://www.addthis.com, which has tracking for most social sharing (maybe not Likes or Tweets). The tracking can be added to Google Analytics.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by vang » Mon Mar 07, 2011 7:18 am

Thank you philbydevil. I am still tweaking the site, but I don't think that will ever end! ;)

Yeah, I also have "AddThis" on the category and product pages.
Had it on there before I started playing with the OpenGraph protocol.
I'll probably keep "AddThis" there for all of the other sharing options.

What I really want is Single Sign On or Facebook Connect integrated.
May have to just purchase the mod from the commercial extensions? :)

Oh, BTW, your site is really nice too! It's a clean and nice modification of OpenCart!
Good job! :)

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by steppen321 » Tue Mar 08, 2011 4:12 pm

daymobrew wrote:I recently added a Facebook Like Button to my product page. I used the FBLB extension (which just includes a modifiy product.tpl file).

Instead of modifying a core file I wrote a vQmod xml file to make the change virtually. It is using Qphoria's excellent vQmod module, with support thread on this board.

You can download the facebook like button xml file from my web site. I have attached it to this post too - just rename .xml.txt to .xml before uploading it to your vqmod/xml directory.
Hi there,

I really like your module for Opencart: vqmod-facebook-like-product.xml,

but I found one inconvient problem with it.

When like button is pressed, on the facebook wall appears product title, description and the RANDOM image from the shop, which never is the one of the product.

Screens:
Image
Image

Do you have any fix?

Newbie

Posts

Joined
Mon Dec 13, 2010 11:32 pm

Post by vang » Sat Mar 12, 2011 1:30 am

@steppen321 ... I believe you are missing the opengraph protocol in your header.

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

Code: Select all

<meta property="og:title" content="<?php echo $title; ?>"/>
<meta property="og:site_name" content="MY_SITE_NAME"/>
<meta property="og:image" content="http://www.MY_DOMAIN.com/catalog/view/theme/MY_TEMPLATE/image/fb/<?php echo $title; ?>.jpg"/>
<meta property="og:type" content="product"/>
<meta property="og:url" content="<?php echo $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id='.$this->request->get['product_id']); ?>"/>
<meta property="og:description" content="<?php echo $description; ?>"/>
You can find more info in the Facebook Developer documentation here:
http://developers.facebook.com/docs/opengraph/

Plus there are other opengraph meta tags you can add as well, which are documented on the above page.

I hope this helps you get the proper images to display. ???

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by vang » Sat Mar 12, 2011 1:48 am

Hey dogacankanat! You have a nice site as well. Congratulations! and Thank you.
Instead of SKU or Title data, i used SEO URL data as product image names. Unfortunately i have a lot of products using the same Title data. Thats why i used SEO URL data. I copied product images which i want facebook to show to the directory " /image/fb/ " and renamed them according to each products SEO URL.
Then i hide "http://www.seherezad.cz/" url by using str_replace code.

Sorry for my bad English, but i think you got it :)
However i belive that there must be a better way to write this code. Do you have any idea?
I believe this is a better execution and think I will try to apply this instead of using titles. ;)

As far as only displaying them on the product pages, I only call my opengraph tags when keywords are used

Code: Select all

<?php if ($keywords) { ?>
THIS IS WHERE I PUT MY OPENGRAPH TAGS
<?php } ?>
So it looks like this

Code: Select all

<?php if ($keywords) { ?>
    <meta property="og:title" content="<?php echo $title; ?>"/>
    <meta property="og:site_name" content="MY_SITE_NAME"/>
    <meta property="og:image" content="http://www.MY_DOMAIN.com/catalog/view/theme/MY_TEMPLATE/image/fb/<?php echo $title; ?>.jpg"/>
    <meta property="og:type" content="product"/>
    <meta property="og:url" content="<?php echo $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id='.$this->request->get['product_id']); ?>"/>
    <meta property="og:description" content="<?php echo $description; ?>"/>
<?php } ?>
Of course, I am going to change the "<?php echo $title; ?>.jpg" to "<?php echo str_replace('http://www.seherezad.cz/', '', $link['href']); ?>.jpg"/>", which is way better than what I had.

It is probably not as clean or as well executed as possible, but I've been learning as I go.
There is probably a better way, but I was looking for a quick solution, then planned to come back later and clean it up. ;)
I hope this helps.

Thank you dogacankanat for providing a better image solution. :)

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by sketchi » Tue Mar 15, 2011 4:29 pm

@vang: I think this thread gives some clues as to the solution of the problem of not being able to call product data such as the SKU or image in the header template:

http://forum.opencart.com/viewtopic.php ... =0#p141521

Maybe your PHP skills are more solid than mine so you can figure out how to adapt this solution to the header template rather than the product template? *fingers crossed*

User avatar
New member

Posts

Joined
Wed Sep 22, 2010 5:04 pm

Post by vang » Wed Mar 16, 2011 11:35 am

@dogacankanat ... yeah, I agree with you. Whether we like it or not, social is the trend. Not only social, but mobile as well. So, I'm looking at making a mobile site off of my current store. Just wish I had coding skills. :( I can probably make due with CSS, but it has its drawbacks.
I think the Facebook comments will be easier than the fbconnect. You can probably just make a new tab and the add the code for fb comments. Then just turn off (in admin) or remove the code for the current reviews system from the product.tpl. I added a Disqus comment tab to my product page.
Keep us updated on your fbconnect adventure and let us know how it goes. I'll keep working on it too and keep you posted.

@sketchi ... dogacankanat had the solution to my problem. Instead of using the Image or SKU, he used the SEO data which worked like a charm.
It wasn't stated before, at least I don't think it was, but the Opengraph tags should be placed in your header.tpl file, not your product .tpl file. This would put the Opengraph protocol in your header. Did I understand you correctly, or did I miss something?
Of course, it still doesn't help if you are trying to pull the SKU data. :(

http://www.aboveclothing.com


New member

Posts

Joined
Mon May 11, 2009 8:22 am


Post by sketchi » Wed Mar 16, 2011 2:56 pm

@vang: Using the SEO data isn't going to work for me as all my images in this case use the SKU in the name. Also, I don't want to force my clients to name the images one way or the other (or enter the SKU in the SEO field), so the ultimate solution would be to call the image whatever it's called.

Calling the image from the product template has never been a problem getting to work as far as I'm concerned, but since meta tags need to sit in the head section it needs to be in the header template as you say, and that's what I don't know how to acheive... :'(

User avatar
New member

Posts

Joined
Wed Sep 22, 2010 5:04 pm
Who is online

Users browsing this forum: No registered users and 23 guests