Hello,
Where can I edit the code so I can add a link in the attribute of a product (e.g. for "product X", I can tell in the Specifications that the compatible product is "product Y", which is click-able and sent you to "product Y" page)
Thank you
Where can I edit the code so I can add a link in the attribute of a product (e.g. for "product X", I can tell in the Specifications that the compatible product is "product Y", which is click-able and sent you to "product Y" page)
Thank you
You could use the Attributes List extension: https://www.opencart.com/index.php?rout ... n_id=33794 or a filtering attribute search extension for your store. This way, even search engines could track your attributes in more generic ways rather than knowing which products specifically would be relative with each attributes.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Any chance to edit the code though?straightlight wrote: ↑Wed Apr 22, 2020 3:27 amYou could use the Attributes List extension: https://www.opencart.com/index.php?rout ... n_id=33794 or a filtering attribute search extension for your store. This way, even search engines could track your attributes in more generic ways rather than knowing which products specifically would be relative with each attributes.
In your catalog/view/theme/<your_theme>/template/product/product.twig file. The attributes are already coded in there. Take note that these attributes works by multiple results for the same products. If you're looking to load a specific attribute, you'd require an extension from the Marketplace to accomplish this. Otherwise, you could build an after event file, OCMod or VQMod to add your content into your $data array in order to load specific attribute names. AFAIK, from the Marketplace, there are extensions that allows to load a drop-down menu to redirect to other product relative pages based on their product options. A similar way could either be done or be used with the attributes.didi13uk wrote: ↑Wed Apr 22, 2020 3:52 amAny chance to edit the code though?straightlight wrote: ↑Wed Apr 22, 2020 3:27 amYou could use the Attributes List extension: https://www.opencart.com/index.php?rout ... n_id=33794 or a filtering attribute search extension for your store. This way, even search engines could track your attributes in more generic ways rather than knowing which products specifically would be relative with each attributes.
See this extension for the product options: https://www.opencart.com/index.php?rout ... n_id=27832 .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Bad idea to start filling attributes with hard-coded links. If your domain name changes, or your product URLs change you'll have created a problem.
You could use related products instead?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Actually I think this is what I wanted to do, products related with the original product.. How can I do this???paulfeakins wrote: ↑Wed Apr 22, 2020 6:39 pmBad idea to start filling attributes with hard-coded links. If your domain name changes, or your product URLs change you'll have created a problem.
You could use related products instead?
The related products are already built-in the product page. You could use the related products from your OC admin - > catalog - > products page and see the results from your catalog page under the product page.didi13uk wrote: ↑Thu Apr 23, 2020 2:45 amActually I think this is what I wanted to do, products related with the original product.. How can I do this???paulfeakins wrote: ↑Wed Apr 22, 2020 6:39 pmBad idea to start filling attributes with hard-coded links. If your domain name changes, or your product URLs change you'll have created a problem.
You could use related products instead?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester