When I first start an order, I cannot add products. If I refresh the page, I see “TypeError: Result of expression ‘newPopupContainer’ [null] is not an object.” as an error for Line 169 of giftmessage.js. (I’ve tried the file both original and as earlier revised; no go. I’m convinced looking at the file it must remain as originally set for the .id value.)
If I again refresh the page, then the error disappears and I can add products, but the CC and shipping information does not appear.
If I yet again refresh the page, the CC info appears, but not the shipping information. Can’t get that to appear in any manner now.
So, if someone has an idea as to how to fix this problem, that would be wonderful!
It appears that the div contents that the js is trying to assign to the new gift message container is not being loaded properly. I have gift options turned off for orders, but also tried it with them on. Again, no go.
Whilst I did not expereince Novusweb niggles with respect to the tweak to the gift message javascript… I did feel that it seemed a little odd to alter the source when the issue seemed to relate directly to the inclusion of a set of javascripts that where not required for order creation, namely ext js - as referred to by Magento.
I appear to have resolved the issue and I am currently testing to see if this fix has any side affects.
I have used the built-in Magento (as of 1.5) system for excluding certain sets of javascript from particular admin pages / processes.
Simply put I have added a flag stating that ext js should not be loaded for sales order create index via the layout xml for the aforementioned process / page.
So far, so good. It appears that after adding products, you still have to click “Update Items and Qty’s” button in order to get the CC information panel to show. I’m not sure if that’s the normal behavior or not.
This is also the file that must be edited to implement this fix…
As pointed out by NikolaiDante, the xml config that includes this file must have an if condition… As my install was completely fresh my build did have the apprioprate “if” condition… As follows:
In order to get this to work / exclude the ext-tree.js from the areas of the admin interface where it is not required, I change the shorthand xml if condition to a longhand (Note the <if> part below)… As follows:
Clear / refresh cache for configurtion / xml layout…
Please note: This appears to work in that, extjs/ext-tree.js is not included in the head of the create order admin page and products can now be added to the order table. I am yet to completely test this and with no documentation with regard to where ext-tree.js is required, it is a little diffcult to tell if it is being included where it should be.
It may be that it is being excluded from everywhere following this change… In turn this may break another part of the admin interface!
Impact of this modification!
If you make the modification in main.xml, “Edit Attribute Set” won’t show attributes for “Groups” and “Unassigned Attributes” panels.
EDIT AGAIN Problem found
Seems like if u are using PfpjRom Extension(called “Legal entity & natural person Romanian Addresses") in version 1.5 it will certanly cause this problem.
To confirm this simple go to System -> Configuration -> Advanced and look for “PfpjRom” Module Output. If u have it, Disable “PfpjRom_AdminhtmlRom”. Then go to Sales -> Orders -> Create new order -> Create New Customer and see if now works! It should! (probably with some issues there)
This happens because PfpjRom is outdated and works only for Magento version 1.4. This is the only problem caused by this module. (so far)
In conclusion, let’s hope the dev who created this module will update it to Magento version 1.5.x and we shall live happily ever after.
into app/design/adminhtml/default/default/layout/sales.xml
but NO LUCK
Whenever I open the page Sales->Orders->"Create New Order” button, error console shows the error
Error: productConfigure is not defined Source File: http://mydomain.com/index.php/admin/sales_order_create/index/ Line: 2453
and now after choosing the customer and the store when I click on “Add Products” and choose the products to add then hit “Add selected product(s) to order”, it does nothing but throws errors in console
Error: productConfigure is not defined Source File: http://mydomain.com/js/mage/adminhtml/sales.js Line: 723
Please help me into this, if anybody have fixed this.
I have implemented a fix for the first issue after diving into the code. It appeared that js/mage/adminhtml/product/composite/configure.js was not being loaded on the page, despite being included in the layout file (line 102 in app/design/adminhtml/default/default/layout/sales.xml):
Well, scratch that. The JS fix only fixed a small part of the issue, but we continued to have other problems such as an error when using the Reorder button in admin. For some reason, our install does not want to load the configure.js file, even though it is clearly in the sales.xml layout file.
My theme and extensions worked fine when I applied them to a fresh install of Magento 1.5.1.0. That is, with the exception of one extension that I had to disable (Mageb2bextensions_Customattributes). WHen it was on, the Sales > Order screen was blank.
So, I blew away my production magento directory (after making a backup, of course), and put this fresh install up there. Now everything is working, although I still cannot exactly say what the issue was.
This is also the file that must be edited to implement this fix…
As pointed out by NikolaiDante, the xml config that includes this file must have an if condition… As my install was completely fresh my build did have the apprioprate “if” condition… As follows:
In order to get this to work / exclude the ext-tree.js from the areas of the admin interface where it is not required, I change the shorthand xml if condition to a longhand (Note the <if> part below)… As follows:
Clear / refresh cache for configurtion / xml layout…
Please note: This appears to work in that, extjs/ext-tree.js is not included in the head of the create order admin page and products can now be added to the order table. I am yet to completely test this and with no documentation with regard to where ext-tree.js is required, it is a little diffcult to tell if it is being included where it should be.
It may be that it is being excluded from everywhere following this change… In turn this may break another part of the admin interface!
Impact of this modification!
If you make the modification in main.xml, “Edit Attribute Set” won’t show attributes for “Groups” and “Unassigned Attributes” panels.
EDIT AGAIN Problem found
Seems like if u are using PfpjRom Extension(called “Legal entity & natural person Romanian Addresses") in version 1.5 it will certanly cause this problem.
To confirm this simple go to System -> Configuration -> Advanced and look for “PfpjRom” Module Output. If u have it, Disable “PfpjRom_AdminhtmlRom”. Then go to Sales -> Orders -> Create new order -> Create New Customer and see if now works! It should! (probably with some issues there)
This happens because PfpjRom is outdated and works only for Magento version 1.4. This is the only problem caused by this module. (so far)
In conclusion, let’s hope the dev who created this module will update it to Magento version 1.5.x and we shall live happily ever after.
I have tested this for 1.6 version and is working fino, but not uninstallation has posible that not use in production mode.
This script needs to be copied in the root of your Magento installation and ran only once (in case of multiple executions exceptions will be threw, so no harm will be caused for your database).
regards
<?php
function pr($p_mData) { echo '<pre>'. print_r($p_mData, true). '</pre>'; }
/** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */
if (version_compare(phpversion(), '5.2.0', '<')===true) { echo '<div style="font:12px/1.35em arial, helvetica, sans-serif;"><div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;"><h3 style="margin:0; font-size:1.7em; font-weight:normal; text-transform:none; text-align:left; color:#2f2f2f;">Whoops, it looks like you have an invalid PHP version.</h3></div><p>Magento supports PHP 5.2.0 or newer. <a href="http://www.magentocommerce.com/install" target="">Find out</a> how to install</a> Magento using PHP-CGI as a work-around.</p></div>'; exit; }
/* Store or website code */ $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
/* Run store or run website */ $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
Mage::app($mageRunCode, $mageRunType);
// the codes of the forms $l_aFormCodes = array( 'customer_address_edit', 'adminhtml_customer_address' );
// the attribute codes of the attributes that we need to add to the forms $l_aAttributesCodes = array( 'pfpj_tip_pers', 'pfpj_cui', 'pfpj_reg_com', 'pfpj_banca', 'pfpj_iban', 'pfpj_cnp', 'pfpj_serienr_buletin', 'pfpj_for_billing', 'pfpj_for_shipping' );
foreach ($l_oAttributeCollection as $l_aAttribute) {
pr('adding '. $l_aAttribute->getAttributeCode(). ' to \'customer_address_edit\' form'); pr('adding '. $l_aAttribute->getAttributeCode(). ' to \'adminhtml_customer_address\' form');
$l_iAttributeId = $l_aAttribute['attribute_id'];
// adds the attribute to 'customer_address_edit' form $l_sSQL = " insert into $l_sTableName set form_code = 'customer_address_edit', attribute_id = ". (int)$l_iAttributeId; $l_oWrite->query($l_sSQL);
// adds the attribute to 'adminhtml_customer_address' form $l_sSQL = " insert into $l_sTableName set form_code = 'adminhtml_customer_address', attribute_id = ". (int)$l_iAttributeId; $l_oWrite->query($l_sSQL); }