
Magento CE 1.7.0.2 Code issue. Ajax call from custom product view page returns error.
- or -
Post a project like this4450
£20(approx. $27)
- Posted:
- Proposals: 2
- Remote
- #285394
- Completed
Description
Experience Level: Entry
Ajax call from custom product view page returns error, but browsing the ajax page directly with $_GET data in url works?
I will attach all relevant full copies of files.
Basically when the finalMasterChange function runs on the view_custom_drawer.phtml page I recieve the following error:
Fatal Error: Call to undefined method:
Mage_Catalog_Model_Product_Type_Simple::getConfigurableAttributesAsArray() in customajaxmain.phtml on line 12 which is this line:
$productAttributeOptions = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
For some reason this seems to be returning the product type as simple even though the product id used is for a configurable product?
Also if you run the custom page directly including the $_GET data in the URL there is no error received and the page returns the desired value:
http://kitchendoors.newportwebdesign.co.uk/customajaxmain/ajax/index/pricetype/price/height/150/width/300/prodid/9038
So why does it fail when the same page is run using an ajax call from the custom product view page?
I can send copies of all files on request.
If you think you can solve this problem please bid, for further information or a full walkthrough of the issue. I can use teamviewer to walk through the problem if needed.
I will attach all relevant full copies of files.
Basically when the finalMasterChange function runs on the view_custom_drawer.phtml page I recieve the following error:
Fatal Error: Call to undefined method:
Mage_Catalog_Model_Product_Type_Simple::getConfigurableAttributesAsArray() in customajaxmain.phtml on line 12 which is this line:
$productAttributeOptions = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
For some reason this seems to be returning the product type as simple even though the product id used is for a configurable product?
Also if you run the custom page directly including the $_GET data in the URL there is no error received and the page returns the desired value:
http://kitchendoors.newportwebdesign.co.uk/customajaxmain/ajax/index/pricetype/price/height/150/width/300/prodid/9038
So why does it fail when the same page is run using an ajax call from the custom product view page?
I can send copies of all files on request.
If you think you can solve this problem please bid, for further information or a full walkthrough of the issue. I can use teamviewer to walk through the problem if needed.

Andrew A.
100% (1)Projects Completed
1
Freelancers worked with
1
Projects awarded
50%
Last project
12 Jul 2013
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies