VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: kiasati on July 10, 2017, 16:16:55 PM

Title: multple urls for a product with multiply categories
Post by: kiasati on July 10, 2017, 16:16:55 PM
Hi

i have a "bullet hd camera"
the categories are:    camera --> hd-camera --> bullet-hd-camera
bullet-hd-camera is a subcategory for hd-camera and hd-camera is a sub-category for camera

i assigned the product to all the 3 categories so when a user clicks on hd-camera in the menu, the user could see all the cameras in hd-camera's subcategories including bullet cameras.

the problem is the product has 3 different urls.

1. sitename.com/camera/the-pruduct-detail
2. sitename.com/camera/hd-camera/the-pruduct-detail
3. sitename.com/camera/hd-camera/bullet-hd-camera/the-pruduct-detail

and thats totally bad seo-wise

how can i have only the third url for the product?
how can i solve this.

another problem is recently only the third product page displays correctly


Title: Re: multple urls for a product with multiply categories
Post by: kiasati on July 15, 2017, 16:56:10 PM
ERRORS IN CONSOLE:

1.
Uncaught ReferenceError: jQuery is not defined
    at دوربين-مداربسته-هايک-ويژن-مدل-ds-2ce16d0t-it1-detail:10
دوربين-مداربسته-هايک-ويژن-مدل-ds-2ce16d0t-it1-detail:14

2.
Uncaught ReferenceError: jQuery is not defined
    at دوربين-مداربسته-هايک-ويژن-مدل-ds-2ce16d0t-it1-detail:14
دوربين-مداربسته-هايک-ويژن-مدل-ds-2ce16d0t-it1-detail:22

4.
Uncaught ReferenceError: jQuery is not defined
    at دوربين-مداربسته-هايک-ويژن-مدل-ds-2ce16d0t-it1-detail:22
cloud-zoom.1.0.3.js:418

5.
Uncaught ReferenceError: jQuery is not defined
    at cloud-zoom.1.0.3.js:418
jquery.flexslider-min.js:5

6.
Uncaught ReferenceError: jQuery is not defined
    at jquery.flexslider-min.js:5
دوربين-مداربسته-هايک-ويژن-مدل-ds-2ce16d0t-it1-detail:50

7.
Uncaught ReferenceError: jQuery is not defined
    at دوربين-مداربسته-هايک-ويژن-مدل-ds-2ce16d0t-it1-detail:50
%D8%AF%D9%88%D8%B1%D8%A8%D9%8A%D9%86-%D9%85%D8%AF%D8%A7%D8%B1%D8%A8%D8%B3%D...A%DA%A9-%D9%88%D9%8A%DA%98%D9%86-%D9%85%D8%AF%D9%84-ds-2ce16d0t-it1-detail

8.
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Title: Re: multple urls for a product with multiply categories
Post by: jenkinhill on July 15, 2017, 17:42:37 PM
Sounds like you may not be loading jQuery
Title: Re: multple urls for a product with multiply categories
Post by: kiasati on July 16, 2017, 15:54:52 PM
Quote from: jenkinhill on July 15, 2017, 17:42:37 PM
Sounds like you may not be loading jQuery

how can i fix it?
how can i eliminate multiple urls for one product?
Title: Re: multple urls for a product with multiply categories
Post by: jenkinhill on July 16, 2017, 16:56:13 PM
Fix the template. Multiple URLs are not usually an issue, it is canonical urls that are important.
Title: Re: multple urls for a product with multiply categories
Post by: Ghost on July 17, 2017, 10:04:08 AM
You can enable flat URLs in VM configuration -> SEO. But this will also apply to category URLs. If you want to avoid that, you'll have to edit router.php.
Title: Re: multple urls for a product with multiply categories
Post by: kiasati on July 18, 2017, 17:39:49 PM
Quote from: jenkinhill on July 16, 2017, 16:56:13 PM
Fix the template. Multiple URLs are not usually an issue, it is canonical urls that are important.

how can i use canonical urls?

should i use any extensions or it can be done by virtuemart itself?

if i should use extensions, does "Canonical Links All in One" or "sh404SEF" help?
Title: Re: multple urls for a product with multiply categories
Post by: kiasati on July 18, 2017, 17:44:11 PM
Quote from: Ghost on July 17, 2017, 10:04:08 AM
You can enable flat URLs in VM configuration -> SEO. But this will also apply to category URLs. If you want to avoid that, you'll have to edit router.php.
what do i have to edit in router.php?
Title: Re: multple urls for a product with multiply categories
Post by: jenkinhill on July 18, 2017, 17:45:59 PM
VM creates canonicals automatically. Just look for rel="canonical" in a VM page's generated code.
Title: Re: multple urls for a product with multiply categories
Post by: antonisdel on March 20, 2018, 13:12:30 PM
yes the canonical is enable , but  how to how to define the primary url
so google does not see duplicate content on the other links= urls
Title: Re: multple urls for a product with multiply categories
Post by: Studio 42 on March 20, 2018, 15:36:26 PM
google does not see duplicate content if you have always same canonical and this is the case (or should be) with virtuemart