Author Topic: ?pop=0 (solved by reformatting the URL)  (Read 31437 times)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10287
  • VirtueMart Version: 3+
Re: ?pop=0
« Reply #15 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

I do NOT do development work for hire.

qme1ster

  • Full Member
  • ***
  • Posts: 276
Re: ?pop=0
« Reply #16 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

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10287
  • VirtueMart Version: 3+
Re: ?pop=0
« Reply #17 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.

I do NOT do development work for hire.

zazu

  • Jr. Member
  • **
  • Posts: 59
Re: ?pop=0
« Reply #18 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

locoman

  • Jr. Member
  • **
  • Posts: 74
Re: ?pop=0
« Reply #19 on: February 12, 2010, 20:08:36 pm »
try this in .htacces

RewriteCond %{query_string} pop
RewriteRule (.*) /$1? [R=301,L]

zazu

  • Jr. Member
  • **
  • Posts: 59
Re: ?pop=0
« Reply #20 on: February 12, 2010, 21:22:56 pm »
Thanks - tried the .htaccess approach and got an Internal Server Error

locoman

  • Jr. Member
  • **
  • Posts: 74
Re: ?pop=0
« Reply #21 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.

zazu

  • Jr. Member
  • **
  • Posts: 59
Re: ?pop=0
« Reply #22 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

locoman

  • Jr. Member
  • **
  • Posts: 74
Re: ?pop=0
« Reply #23 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.


stinga

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 872
    • Squangle ltd
Re: ?pop=0
« Reply #24 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.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

mbit

  • Full Member
  • ***
  • Posts: 323
Re: ?pop=0
« Reply #25 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..

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10287
  • VirtueMart Version: 3+
Re: ?pop=0
« Reply #26 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;
I do NOT do development work for hire.

mbit

  • Full Member
  • ***
  • Posts: 323
Re: ?pop=0
« Reply #27 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

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10287
  • VirtueMart Version: 3+
Re: ?pop=0
« Reply #28 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.
I do NOT do development work for hire.

mbit

  • Full Member
  • ***
  • Posts: 323
Re: ?pop=0
« Reply #29 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