VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Security (https) / Performance / SEO/ SEF issues VM 1.1 => Topic started by: joneustace on September 16, 2009, 13:59:33 pm

Title: ?pop=0 (solved by reformatting the URL)
Post by: joneustace on September 16, 2009, 13:59:33 pm
Hi there, I'm running Joomla 1.5.14 and VM 1.1.3 with SH404SEF 1.0.16_Beta - build_222.

I've noticed in webmaster tools that I have many pages with duplicate meta tags... the source of these duplicates are the pop=0 and pop=1 pages.

What I mean is this : I'll have a page http://www.mysite.com/category/product1.html

Then I'll have a duplicate of that page http://www.mysite.com/category/product1.html?pop=0 and ?pop=1 how do I make the pop=0 pages noindex ? Is there a reason why these pages even exist?

What I'm looking for is a way to make these pop=0 pages "noindex" is there a way to do this easily?

Title: Re: ?pop=0
Post by: joneustace on September 16, 2009, 22:04:39 pm
I found out that these ?pop=0 links are in the previous and next page links within the flypage. How can I remove this?
Title: Re: ?pop=0
Post by: PRO on September 17, 2009, 19:18:55 pm
I found out that these ?pop=0 links are in the previous and next page links within the flypage. How can I remove this?


go into your configuration and disable "pathway on product page"
Title: Re: ?pop=0
Post by: stinga on November 10, 2009, 23:38:27 pm
G'day,

Were is "pathway on product page".
This post is the only reference I can find to "pathway on product page"
Title: Re: ?pop=0
Post by: Scar on November 11, 2009, 03:14:27 am
Pathway is for breadcrumbs but this setting is right below. It's in admin->config->Site(tab)->Configuration, Show Prev/Next Product Link that gives ?pop=0
Title: Re: ?pop=0
Post by: qme1ster on November 18, 2009, 17:47:16 pm
Hi,

I too have the "?pop=0" appended to my VM product URL's but I don't want to remove the next and previous product links. I want them to appear, just without the unwanted "?pop=0".

Is there no other solution ?

Grateful for any help.
Title: Re: ?pop=0
Post by: stinga on November 18, 2009, 21:21:29 pm
G'day,

You could probably just add a line to robots.txt.
I have not done this yet.
Title: Re: ?pop=0
Post by: qme1ster on November 18, 2009, 21:33:06 pm
Hi Stinga,

I'm not familiar with how that would be done - could you please explain how ?

( I was also wondering if with sh404sef I can perhaps do something about these additional URL's...? )
Title: Re: ?pop=0
Post by: qme1ster on November 19, 2009, 18:59:11 pm
Hi guys n gals,

Does anyone have a solution to this issue please ? I really want to keep the next and previous product links but don't want these duplicate URL's.

Thanks in advance
Title: Re: ?pop=0
Post by: stinga on November 21, 2009, 17:30:26 pm
G'day,

First get yourself on Google 'Webmaster Tools'.
You can then test your robots.txt without actually making a mess of your robots.txt file.

Then...
Add a line to robots.txt that looks like...
Code: [Select]
Disallow: *?pop=0
Test well or you might no longer be spidered!
Title: Re: ?pop=0
Post by: qme1ster on January 08, 2010, 20:44:21 pm
Thanks for your advice Stinga. I guess as a short term solution this will have to suffice. However longer term, to my mind there should really be a solution to this within VM which does not require such a workaround. Ideally the output should not give rise to duplicate content.

Are there any other ideas/advice out there ?

Grateful for any help, including any feedback from any developers if time permits.

Many thanks in advance
Title: Re: ?pop=0
Post by: PRO on January 08, 2010, 21:20:12 pm
pathhway.tpl.php

foreach( $pathway as $item ) { ?>
   <?php if( !empty( $item->link ) ) : ?>
   <a rel="nofollow" class="pathway" href="<?php echo $item->link ?>"><?php echo $item->name ?></a>
   <?php else: ?>
   <?php echo $item->name ?>
   <?php endif; ?>
Title: Re: ?pop=0
Post by: qme1ster on January 11, 2010, 17:47:48 pm
Thanks Banquet - will this change have any knock-on effect elsewhere which I should be aware of ? Is there a reason that the original code is structured this way, giving rise to the duplicate URL's ?
Title: Re: ?pop=0
Post by: PRO on January 11, 2010, 18:26:39 pm
This will not cause a problem. It will only tell google not to use that version.

Title: Re: ?pop=0
Post by: qme1ster on January 11, 2010, 18:34:29 pm
So just to confirm, the additional URL's will still be output, however amending the code as advised simply instructs Googlebots not to index those duplicate URL's. Is that correct ?
Title: Re: ?pop=0
Post by: PRO on January 11, 2010, 18:38:18 pm
It prevents google from indexing the links.

BUT if they find it somewhere else they will index it

Title: Re: ?pop=0
Post by: qme1ster on January 11, 2010, 18:44:29 pm
So would it be better to implement with robots.txt file as suggested above ? Grateful for your advice
Title: Re: ?pop=0
Post by: PRO on January 11, 2010, 19:25:12 pm
I have never seen anyone put a parameter in their robots.txt file.

You can also tell google to ignore the parameter in your webmaster tools.

Title: Re: ?pop=0
Post by: zazu on January 28, 2010, 07:56:28 am
I used to have this problem until someone suggested adding this code to the flypage.tpl.php file

$previous_product_url=str_replace ('?pop=0', '', $previous_product_url);
$next_product_url=str_replace ('?pop=0', '', $next_product_url);
if( $this->get_cfg( 'product_navigation', 1 )) {
   if( !empty( $previous_product )) {
      echo '<a class="previous_page" href="'.$previous_product_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>';
   }
   if( !empty( $next_product )) {      
      echo '<a class="next_page" href="'.$next_product_url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>';
   }
}

The only problem is that pop=0 seems to come back. I don't know whether i have entered the code correctly or maybe sh404sef is causing the problem.

Can't find the original post where this code was suggested
Title: Re: ?pop=0
Post by: locoman on February 12, 2010, 20:08:36 pm
try this in .htacces

RewriteCond %{query_string} pop
RewriteRule (.*) /$1? [R=301,L]
Title: Re: ?pop=0
Post by: zazu on February 12, 2010, 21:22:56 pm
Thanks - tried the .htaccess approach and got an Internal Server Error
Title: Re: ?pop=0
Post by: locoman on February 16, 2010, 11:48:19 am
i have this in my template file for the product browse flupage.tpl.php (if you use this)

Code: [Select]
}
$previous_product_url=str_replace ('?pop=0', '', $previous_product_url);
$next_product_url=str_replace ('?pop=0', '', $next_product_url);
if( $this->get_cfg( 'product_navigation', 1 )) {


and its works. i only added this to it.

Code: [Select]
$previous_product_url=str_replace ('?pop=0', '', $previous_product_url);
$next_product_url=str_replace ('?pop=0', '', $next_product_url);

the rest was in there.
Title: Re: ?pop=0
Post by: zazu on February 16, 2010, 19:44:52 pm
I have that in my template as well. It worked for a while, but has stopped working. I have reloaded the original template and copied the code as per your post , purged the sh404sef cache - no improvement
Title: Re: ?pop=0
Post by: locoman on February 16, 2010, 20:56:22 pm
please make sure that you use the template from the same folder.

i mean in virtuemart now you have also ”Select the theme for your Shop!”

in ja-larix and in the default template folder (components/com_virtuemart/themes/) are 2 folders.

each ofthem contain a flypage.tpl.php but you definedin the backend from virtuemart wich template should virtuemart use. i have at the begining make a mistake to select one and try to modify the flypage.tpl.php from the other. this was not working and for some hours i did not know why.

Title: Re: ?pop=0
Post by: stinga on February 17, 2010, 22:20:33 pm
G'day,

I added...
Disallow: *pop=0
to my robot.txt and the problem seemed to go away.

As far as I can tell a url with pop=0 is the same as with no pop=0 at all.
So I think the real solution is to raise a bug report and get pop=0 removed from the url altogether.
Title: Re: ?pop=0
Post by: mbit on September 03, 2010, 17:26:33 pm
G'day,

I added...
Disallow: *pop=0
to my robot.txt and the problem seemed to go away.

As far as I can tell a url with pop=0 is the same as with no pop=0 at all.
So I think the real solution is to raise a bug report and get pop=0 removed from the url altogether.
this didnt worked for me.. i have it over a month now and still have many duplicated titles in webmaster cause of ?pop=0..
Title: Re: ?pop=0
Post by: PRO on September 03, 2010, 17:38:23 pm
shop.product_details.php

remove the "pop" parameter
   $url_parameters = 'page=shop.product_details&product_id='.$next_product['product_id'].'&flypage='.$ps_product->get_flypage($next_product['product_id']).'&pop='.$pop;
Title: Re: ?pop=0
Post by: mbit on September 03, 2010, 17:57:53 pm
shop.product_details.php

remove the "pop" parameter
   $url_parameters = 'page=shop.product_details&product_id='.$next_product['product_id'].'&flypage='.$ps_product->get_flypage($next_product['product_id']).'&pop='.$pop;
in the webmaster the duplicated tags of a page are :
/store/details/10/product_name.html?pop=0&manufacturer_id=23
/store/details/10/product_name.html?pop=0&manufacturer_id=38
/store/details/10/product_name.html?pop=0

by removing the
Code: [Select]
.'%pop='.$pop;  i remove all the urls that follow after ?pop=0 or should i comment the the if (manufacturer_id) statements also?

thank you
Title: Re: ?pop=0
Post by: PRO on September 03, 2010, 18:09:32 pm
if you dont want the manufacturer in the url, you are going to have to remove that as well

NOW: please not. I wasnt giving you EXACT way top remove it. I do not know PHP. But it can be removed, as long as your keep the statement valid.
Title: Re: ?pop=0
Post by: mbit on September 03, 2010, 19:22:17 pm
i commented manufacturer statement in both next & previous and the difference is that now when i choose a product from manufacturer_id=28 listing products page ,  i get a link like /.../.../.../?manufacturer_id=28 but when i choose next product  ?manufacturer_id=28 doesnt follow to the end of the next product url.

I also found other duplicates because of :
when i open a category and i choose a product the link is like :
/store/details/product_id/category_id/category_name/product_name.html

but when i open the same product from a manufacturer product listing page the url is the same with a ?manufacturer_id at the end

Also when i press next or previous button the url is like
/store/details/product_id/product_name.html

i think the method is the best also cause the urls are shorter. any ideas which files i should start editing in order to change these urls ? ?

thank you
Title: Re: ?pop=0
Post by: PRO on September 03, 2010, 19:31:54 pm
i dont really understand your post
Title: Re: ?pop=0
Post by: mbit on September 03, 2010, 20:01:16 pm
ehm sorry for my english.

my product link is like :

/store/details/32/31/category32/product31.html

when i press next or previous button the url changes to  :

/store/details/31/product31.html

as a result these 2 links open the same product :/

edited :

i am trying to add something like

Code: [Select]
'&category_id='.$next_product['category_id'].
at shop.product_detail.php line 176
Code: [Select]

if( !empty($next_product) ) {
$url_parameters = 'page=shop.product_details&product_id='.$next_product['product_id'].'&flypage='.$ps_product->get_flypage($next_product['product_id']);//.'&pop='.$pop;
in order the url to appear the same
Title: Re: ?pop=0
Post by: PRO on September 03, 2010, 20:52:51 pm
you dont need to add anything. The url is formed somewhere. So you need to edit where its formed
Title: Re: ?pop=0
Post by: mbit on September 05, 2010, 10:55:45 am
you dont need to add anything. The url is formed somewhere. So you need to edit where its formed
so how i should i fix this if i dont edit this file?? 
Title: Re: ?pop=0
Post by: PRO on September 05, 2010, 13:08:25 pm
find where the urls are setup. Each url is setup somewhere.
Title: Re: ?pop=0
Post by: mbit on September 06, 2010, 09:50:43 am
Ι fixed it by adding category_id at the end of next & previous buttons url in file shop.product_details.php .
My last issue with the duplicated tags is when i visit a manufacturer link
Code: [Select]
$link = "index.php/store.html?page=shop.browse&manufacturer_id=$manufacturer_id";

and then i choose a product from this list, the products url has '?manufacturer_id' at the end of the url. any idea how to remove that?

edited: just founded! it was in shop.browse.php ! just comment the manufacturer_id after the function that have to! thanks you for help!
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: mbit on September 07, 2010, 16:20:52 pm
right now in google webmasters i have 230 duplicated title tags.
In order google to delete the duplicated urls do i have to disable these links or its ok if list like these dont exist in the site from now on? i mean i fixed them so now when i press next button  there is no ?manufactuer_id=.. at the end of the url.. is this enough and i should just wait google to scan me again or should i delete somehow every duplicated that has already scanned.. ?
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: PRO on September 07, 2010, 16:56:14 pm
thats enough, but you could also add the parameter to googles "ignore parameter list"

Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: mbit on September 07, 2010, 17:26:00 pm
thats enough, but you could also add the parameter to googles "ignore parameter list"


i havent seen that parameter so long.
so simple adding 'manufacturer_id' and 'pop' as ignored parameters,
 will disappear the following duplicated links right?

/store/details/63/product.html?pop=0&manufacturer_id=10
/store/details/63/product.html?pop=0&manufacturer_id=3
/store/details/63/product.html?pop=0&manufacturer_id=8
/store/details/63/product.html?pop=0&manufacturer_id=9
thank you :D
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: PRO on September 07, 2010, 17:48:24 pm
yes, will probably take 1 month for webmaster to be updated. but its updated immediately with google
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: mbit on September 07, 2010, 17:54:57 pm
yes, will probably take 1 month for webmaster to be updated. but its updated immediately with google
thank you ! also another duplicated title is  with pages  / and index.php
should i redirect index.php to /  ?
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: PRO on September 07, 2010, 17:57:11 pm
I dont worry about that one bit.
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: mbit on September 28, 2010, 11:47:19 am
duplicated links in webmasters started to grow up again.. Now as i can see i have new duplicated links that looks like :

/store/category/&limit=20&limitstart=0
/store/category/&limit=20&limitstart=120
/store/category/&limit=20&limitstart=160
/store/category/&limit=20&limitstart=180
/store/category/&limit=20&limitstart=20
/store/category/&limit=20&limitstart=40
/store/category/&limit=20&limitstart=60

Although i had added the parameter limit and limitstart in webmasters settings. This is a matter of time in order to get deleted?
also another issue i see is that my url when i browse a product in the site is like :
/store/detail/product_id/cat_id/cat_name/product_name.html

but if i delete the /cat_id/cat_name/product_name.html and i simple try the url /store/detail/product_id the page is still working and its the same product with the last one.
and according to webmasters still have no more urls indexed since last month.

In my site every link to a product is like /store/detail/product_id/cat_id/cat_name/product_name.html the featured products urls are like this, the next - previous buttons in Breadcrumbs also and the urls from the categorys where product are listing and from the search listing also. i cant understand how googlebot generates these pages :/

the router.php file i am using is one i found in the vm forum here. Any suggestions are welcome
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: ruben-sp on December 19, 2010, 21:10:50 pm
hi all

i found this post and seems to work

--------------------------

You just need to add a rewrite rule in your .htaccess file.

Because that trailing parameter makes the same url
look like two different ones. And that causes duplicate
title and description problems with google.

The rewriting rule you need to add is the following:
Code:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^?]*)\?
RewriteRule \.html$ http://www.yoursite.co.uk/%1? [R=301,L]


Just after the line:
Code:
RewriteEngine On

Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: ruben-sp on February 27, 2011, 09:44:14 am
I found a final hack!!

edit
/administrator/components/com_virtuemart/html/shop.product_details.php

remove line 177
$url_parameters = 'page=shop.product_details&product_id='.$next_product['product_id'].'&flypage='.$ps_product->get_flypage($next_product['product_id']).'&pop='.$pop;

replace with
    if ($pop == 0)
    {
        $url_parameters = 'page=shop.product_details&product_id='.$next_product['product_id'].'&flypage='.$ps_product->get_flypage($next_product['product_id']);
    } else
    {
      $url_parameters = 'page=shop.product_details&product_id='.$next_product['product_id'].'&flypage='.$ps_product->get_flypage($next_product['product_id']).'&pop='.$pop;
    }
remove line 200
$url_parameters = 'page=shop.product_details&product_id='.$previous_product['product_id'].'&flypage='.$ps_product->get_flypage($previous_product['product_id']).'&pop='.$pop;

replace with
   if ($pop == 0)
    {
        $url_parameters = 'page=shop.product_details&product_id='.$previous_product['product_id'].'&flypage='.$ps_product->get_flypage($previous_product['product_id']);
    } else
    {
      $url_parameters = 'page=shop.product_details&product_id='.$previous_product['product_id'].'&flypage='.$ps_product->get_flypage($previous_product['product_id']).'&pop='.$pop;
    }   
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: stinga on February 28, 2011, 13:32:57 pm
Didn't I say to do that? :-) Or was it someone else?
Title: Re: ?pop=0 (solved by reformatting the URL)
Post by: markvding on October 14, 2013, 10:46:05 am
This is what I did. I do like Google to spider and crawl my site so I wasn't happy with the "nofollow" option. You can change the showPathway stuff to the following in your product_detail templates:

Code: [Select]
<?php 
if( $this->get_cfg'showPathway' )) {
echo "<div class=\"pathway\">$navigation_pathway</div>";

if( 
$this->get_cfg'product_navigation')) {


$search_text $previous_product_url;
$look_for "?pop=0";
$change_to "";
$prev_url str_replace($look_for$change_to$search_text);

$search_text2 $next_product_url;
$look_for2 "?pop=0";
$change_to2 "";
$next_url str_replace($look_for2$change_to2$search_text2);


if( !empty( $previous_product )) {
echo '<a class="previous_page" href="'.$prev_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>';
}
if( !empty( $next_product )) {
echo '<a class="next_page" href="'.$next__url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>';
}
}
?>

[code]