Prevent google indexing cart links

  • Posts: 43
  • Thank you received: 0
8 years 11 months ago #200044

-- HikaShop version -- : 2.4.0
-- Joomla version -- : Joomla! 3.3.6
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Firefox 37.0.2

Hi,
I have found that google keeps indexing component links to carts/wishlists. I don't think it's a good idea to have potential customers clicking on these links to get to the website only to be greeted with virtually a blank page and a messege saying either "You must be logged in to use wishlists" or "Product successfully added to the cart".

Please refer to the hidden URL and attachment.

Is there a way to stop this other than robots.txt please?

Attachments:
Last edit: 8 years 11 months ago by BeLlSiBuB.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
8 years 11 months ago #200081

Hi,

We just added code on our end based on your request, in the file "administrator/components/com_hikashop/helpers/cart.php", function "getJS()", replace:

						echo '<div style="display:none;">'.
							'<a rel="{handler: \'iframe\',size: {x: '.$popupWidth.', y: '.$popupHeight.'}}"  id="hikashop_notice_box_trigger_link" href="'.hikashop_completeLink('checkout&task=notice&cart_type=cart'.$url_itemid,true).'"></a>'.
							'<a rel="{handler: \'iframe\',size: {x: '.$popupWidth.', y: '.$popupHeight.'}}" id="hikashop_notice_wishlist_box_trigger_link" href="'.hikashop_completeLink('checkout&task=notice&cart_type=wishlist'.$url_itemid,true).'"></a>'.
							'</div>';
By:
						echo '<div style="display:none;">'.
							'<a rel="{handler: \'iframe\',size: {x: '.$popupWidth.', y: '.$popupHeight.'}} nofollow"  id="hikashop_notice_box_trigger_link" href="'.hikashop_completeLink('checkout&task=notice&cart_type=cart'.$url_itemid,true).'"></a>'.
							'<a rel="{handler: \'iframe\',size: {x: '.$popupWidth.', y: '.$popupHeight.'}} nofollow" id="hikashop_notice_wishlist_box_trigger_link" href="'.hikashop_completeLink('checkout&task=notice&cart_type=wishlist'.$url_itemid,true).'"></a>'.
							'</div>';

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 0
8 years 11 months ago #200119

Thanks for looking at this. I replaced what looked like the code on cart.php using dreamweaver although I could not find the exact text. So I guess I will wait and see what happens with google?

Please Log in or Create an account to join the conversation.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #200124

Hi,

The extra text ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 0
8 years 11 months ago #200176

Ahh, I forgot to include "Ignore whitespace". So will this stop google indexing these links or does it do something else?

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
8 years 11 months ago #200213

Yes, it will stop google indexing these links, nothing else.

The following user(s) said Thank You: BeLlSiBuB

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum