Tuesday, 24 February 2015

Problem with simple configurable product module in Magento1.9

Problem with simple configurable product module (organic internet) and Magento1.9 with selecting associated products, update attribute values and associated product images with zoom.


Install the simple configurable product option of organic internet.

Then go to configurable product detail page. You can see, when you select any associate product you can see only the price is changing not the image and not the attribute section and even not name also.

These things occurred because of in magento 1.9 there is default theme rwd and it doesn't have class or html tags which is written in js file of scp name "scp_product_extension.js" to replace content after associated product selection.

For changing attributes values in tab view. You need to go to your theme's "view.phtml" page. Where  you can find the below code at "app/design/frontend/rwd/default/template/catalog/product/view.phtml"



Here you need to add one class for tab-specification. Let suppose I added class name "tab-specification" at  <div class="tab-content">
See the screen shot



Now go to  scp extensions  js file named "scp_product_extension .js" .
Here you can see approximately on line no 256, the code for replace additional information.

You can find it at "skin/frontend/base/default/js".



What you have to do is just change the class name  of "div.box-additional" to new class name which is added by us i.e. "div.tab-specification".
  

Now for changing the image of products with selecting associated products. Check the line no 204 on "scp_product_extension .js".  In this section you need to change the image "id" and image "path" or on which div it's exists. 


Then change as below for image id and image tag location
  

After that you need to do only single step for changing the image of a associated products. Here you have to disable the default code and write your own code for image replace with zoom functionality re-initialization.




You can see the default image replace and zoom functionality code at line no 300

You have to change this code with below given code
  

Comment the default code and add your code for replacing image with zoom functionality re-initialized.



That's it now check your product detail page the attribute values and associated product images are working correct with zoom functionality.


2 comments:

  1. Many thanks for sharing this. This works well. I have noticed however that if you have more than one image for a simple product and you click a thumbnail, the image doesn't change. I can't figure out why. I was wondering if it is something specific to my Magento 1.9 installation?

    ReplyDelete
    Replies
    1. as your problem of image swap for simple product, it won't be wrong with installation you just check with your log file or check your console, i think your jquery will not found the destination path or do not get the image where to replace. please check with thumb url and jquery code, or please is there any error please feel free to share with me.

      thank you

      Delete

about new GraphQL freature in Magento2

GraphQL: GraphQL is a data query language developed internally by Facebook in 2012 before being publicly released in 2015. Magento impleme...