News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Ask a question about this product link and SEO?

Started by dmitryseliv, September 03, 2012, 05:51:12 AM

Previous topic - Next topic

dmitryseliv

Not sure how to fix this.
if Joomla SEO friendly URL turned on "Ask a question about this product" link doesn't work.
the modal works but it's loading wrong page.

Is the any fix for that?

Thank you, DS

uschmi

I have the same problem. It´s definitely a SEO problem!

$url is originally: $url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $this->product->virtuemart_product_id . '&virtuemart_category_id=' . $this->product->virtuemart_category_id . '&tmpl=component');

SEO turns this into http://www.unexsports.de/produkte/bademode/bademode-damen/speedo-aquasprint-placement-powerback/askquestion/modal.html (in my case) which could not be found.


jjk

Your SEF url link above looks to me like you have a blank Seo Suffix field in VM2 'Configuration' - 'SEO' tab. Make shure you have a suffix in this field (default is "-detail") and disable the suffix in Joomla configuration.
And maybe update to latest VM2 version. The ask a question works on my installation with SEO enabled, but the last part of my url before the "modal" shows a different string in the link. Instead of  .../productname-detail/askquestion/modal, I have .../productname-detail/ask_a_question/modal.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

uschmi

Looks like VM SEO suffix does not work for me. Nothing changes on my urls whether I set a suffix or not, the suffix is still ignored. I tried with/without Joomla suffixes (which works).
The button "Ask a question for this product" generates a link like http://.../<my product url>/askquestion/modal      => results in blank page in modal window.

I´m using Joomla 2.5.6 + VM 2.0.10.

jjk

#5
The VM2 SEO suffix is mandatory, the Joomla SEO suffix is useless and generates duplicate suffixes when used with VM2.
Clicking on your "Ask a question" button produces a warning saying:

Warning: The character encoding of a framed document was not declared. The document may appear different if viewed without the document framing it.
Source File: ...unexsports.de/produkte/bademode/bademode-damen/speedo-aquasprint-placement-powerback/askquestion/modal.html

So maybe a character encoding issue??? Did you try Joomla Debug and Language Debug already?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

uschmi

Sorry, could you explain this (character encoding issue) a bit further. No idea, what to do... :(

uschmi

The following is in the header of my template:

<?php
$option = &JRequest::getVar('option');
$page = &JRequest::getVar('page');
if($option=="com_virtuemart" && (!$page || $page=='shop.product_details')):
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0"
  xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<?php
else:
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
  xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<?php
endif;
?>

<html itemscope itemtype="http://schema.org/Business" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">

jjk

Hmm, the warning might just be a Firefox issue. However, I just clicked on your link again and this time it worked. Looks like you found a solution.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

uschmi

Yes, I found the solution: due to SEO-problems in earlier VM2 versions, I created menu links for every product. But this affects the SEO urls in a way that "Ask a question" urls doesn-t works. Eleminating these menu entries made "Ask a question" work again.

Thanks for your help!

ERNIK

Quote from: uschmi on September 11, 2012, 14:08:56 PM
Yes, I found the solution: due to SEO-problems in earlier VM2 versions, I created menu links for every product. But this affects the SEO urls in a way that "Ask a question" urls doesn-t works. Eleminating these menu entries made "Ask a question" work again.

Thanks for your help!

Thanks, your solution does work.  Unfortunately, the site I'm developing does require menu links for every product.  Is there any other possible solution to this problem?  Any suggestions?

jjk

Quote from: ERNIK on September 11, 2012, 20:41:24 PM
[Any suggestions?
Just try it. As long as you have a SEO suffix in VM2 configuration, it (normally) should work.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations