Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Problem with ceon and add a javascript in product page...

Problem with ceon and add a javascript in product page...

Views: 1,444

Results 1 to 7 of 7
9 Dec 2012, 6:08 PM
#1
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Problem with ceon and add a javascript in product page...

Hi, I have the module ceon ... works perfectly but there is a problem. if I try to share a link of a product (with ceon) on facebook, I do see the preview ... while if ceon off, everything works perfectly, how can I do? devvo add a java script? and where?
Thank you, Regards.
http://www.disotech.it/console_giochi/nintendo_wii_family_edition_sport (with Ceon)
http://www.disotech.it/index.php?main_page=product_info&cPath=138&products_id=462%28without%29

:no::no::no:

10 Dec 2012, 11:11 AM
#2
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Re: Problem with ceon and add a javascript in product page...

nobody can help me? :( :( :(

10 Dec 2012, 4:40 PM
#3
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Problem with ceon and add a javascript in product page...

I do not see a "share" button on your site... I also do not see any opengraph data on the page. The like / unlike seems to work just fine. There "may" be a nesting error on your page with elements.

You may want to clarify what you are asking (such as exactly what happens in both cases and what you want to happen). It also never hurts to answer the questions in the "Posting Tips" section right above where you are typing to reply.

10 Dec 2012, 7:29 PM
#4
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Re: Problem with ceon and add a javascript in product page...

then .. I want that if I select all the product link and paste on facebook I get a preview of the prdotto .. as with the link without ceon activated ... how do I?

11 Dec 2012, 7:53 PM
#5
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Problem with ceon and add a javascript in product page...

The cause of your issue is multifold.
First: Zen Cart does not specify the absolute path names to images by default - instead it uses the "base href" meta tag to tell browsers to prepend this URL to relative path names. Nothing wrong with this in and of itself. Second: FaceBook's Open Graph API does not read the "base href" meta tag when scraping your website to find an image. Not many websites use the "base href" meta tag... so understandable.

Huh? Why is this an issue?
Why can they find the image with URL rewriting disabled but not when URL rewriting is enabled? As FaceBook does not currently use the "base href" meta tag it assumes the path is relative to the current page - not the website. Zen Cart Dynamic URLs are always on the website root - so everything works. Your rewritten URL contains a directory and is not on the website root - so it tries to access "http://www.disotech.it/console_giochi/bmz_cache/a/a1e9901b302de7165e1bd14bbca5b5ab.image.190x190.jpg" because you are in the directory "/console_giochi/". As there is no image at the location (404) FaceBook does not include an image.

How to Fix
1) Use Zen Cart Dynamic URLs or do not use directories in your rewritten URLs. Relatively easy, but not as pretty.

2) Change your templates to not depend on the "base href" meta tag. Specify all resources (images, css, javascript, etc) as absolute paths. This option works well and I have a couple client's whose templates do not use the "base href" meta tag. This can be complicated (find someone who knows templates and XHTML) and may involve changes to Image Handler (a plugin you are using).

3) Add the appropriate Open Graph tags to your individual pages. See http://goo.gl/xFI0u for more details. This is currently FaceBook's preferred method for you to communicate how a URL is shared on FaceBook. I do not currently know of any plugins to automate / aid in this process.

4) Request FaceBook update their API to utilize the "base href" meta tag when parsing a URL to determine the image / video to display. Wait for them to implement the change... No guarantee they ever will.

11 Dec 2012, 11:14 PM
#6
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Re: Problem with ceon and add a javascript in product page...

ok ok thank you you have been very kind and very clear .. and if I uninstall url ceon, there is another form for seo, it works perfectly without this problem? (when AEVO joomla with virtuemart, there was this problem ... what is the right form for me? Thank you very much ..