VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: dmitryseliv on September 03, 2012, 05:51:12 AM

Title: Ask a question about this product link and SEO?
Post by: dmitryseliv on September 03, 2012, 05:51:12 AM
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
Title: Re: Ask a question about this product link and SEO?
Post by: uschmi on September 06, 2012, 11:53:47 AM
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.
Title: Re: Ask a question about this product link and SEO?
Post by: uschmi on September 11, 2012, 10:41:51 AM
Anyone?
Title: Re: Ask a question about this product link and SEO?
Post by: jjk on September 11, 2012, 11:16:13 AM
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.
Title: Re: Ask a question about this product link and SEO?
Post by: uschmi on September 11, 2012, 11:41:52 AM
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.
Title: Re: Ask a question about this product link and SEO?
Post by: jjk on September 11, 2012, 12:05:07 PM
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?
Title: Re: Ask a question about this product link and SEO?
Post by: uschmi on September 11, 2012, 13:11:37 PM
Sorry, could you explain this (character encoding issue) a bit further. No idea, what to do... :(
Title: Re: Ask a question about this product link and SEO?
Post by: uschmi on September 11, 2012, 13:14:43 PM
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; ?>">
Title: Re: Ask a question about this product link and SEO?
Post by: jjk on September 11, 2012, 13:59:09 PM
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.
Title: Re: Ask a question about this product link and SEO?
Post by: 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!
Title: Re: Ask a question about this product link and SEO?
Post by: ERNIK on September 11, 2012, 20:41:24 PM
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?
Title: Re: Ask a question about this product link and SEO?
Post by: jjk on September 11, 2012, 21:15:47 PM
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.