CopyCat Category Duplicator is available as both a premium tool in the Your Store Tools suite and as a stand-alone app in the BigCommerce Store. This documentation on this page applies for BOTH versions.

In order to set categories as canonical, you’ll need to edit your templates/layouts/base.html page within your theme. 

You will need to replace the following which is in the first few lines of your template:

{{{ head.meta_tags }}}

With this code:

{{#if page_type '===' 'category'}}
	{{ assignVar "currentCanonical" (first (split (last (split head.meta_tags "link rel='canonical' href='")) "' /><meta name='platform'"))  }}
	{{#contains head.meta_tags 'meta name="description"' ~}}
	    {{ assignVar "rawCanonical" (first (split (last (split head.meta_tags 'meta name="keywords" content="')) '"><meta')) }}
	{{~else~}}
	    {{ assignVar "rawCanonical" (first (split (last (split head.meta_tags 'meta name="keywords" content="')) '"><link')) }}
	{{/contains}}
	{{#contains (getVar "rawCanonical") 'canonical|'}}
	{{ assignVar "canonical" (last (split (getVar "rawCanonical") 'canonical|')) }}
		{{#each (split head.meta_tags (getVar "currentCanonical")) ~}}
			{{#contains this 'canonical' ~}}
				{{{this}}}{{{ getVar "canonical" }}}
			{{~else~}}
				{{{this}}}
			{{~/contains}}
		{{~/each}}
	{{else}}
		{{{ head.meta_tags }}}
	{{/contains}}
{{else}}
		{{{ head.meta_tags }}}
{{/if}}


Did you find an error or need additional support? Contact us at support@yourstorewizards.com to let us know!