1

We have a lot of configurable products on our website and we need to show the schema on the basis of configurable child on view source. We are using magento dafault way of displaying child products when any configurable option is selected. This is a screenshot of our product page.

enter image description here

Now when the configurable options are selected, then we are changing product sku, description and all the other attributes on the basis of child products. Now client wants us to change the schema also on the basis of child products and that too while clicking ctrl + u. The entire process of changing sku and other attributes happens using javascript so it works fine. But showing schema for child products on ctrl + u, is not possible.

Because ctrl + u loads data from the server and the child products are loaded using javascript. So what I can do is fetch all the child products and show the schema for all on ctrl + u, but I can not think of a way to show schema for single simple products on ctrl + u.

The schema that shows right now on ctrl + u is of configurable product.

enter image description here

I need to show the schema for simple products here and that too on ctrl + u. Example: When any configurable option is selected then the simple product that comes up, I need to show the schema for that on ctrl + u, I think for that I need to load the page first and that option will be auto selected so that I can find out which simple product is selected and show the schema based on that.

I can not think of a way to proceed. Could someone guide me how I can proceed with this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.