diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index a072725d9c..de3ea51e0f 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,3 +1,472 @@ +==== 1.6.0.0 ==== + +=== Major Highlights === +Minimum Advertised Price +Persistent Shopping Cart +Shipping Integration with Label printing support + +=== Improvements === +XmlConnect package release v21 +Order Payment Action for Express Checkout (PayPal) +- Added settings Authorization Honor Period and Order Valid Period into EC tab in the backend +- Automatically new authorize transaction created after order transaction +- Automatically cancel order after the expiration of Order Valid Period +- Automatically authorize transaction void\create after the expiration of Authorization Honor Period +Implemented Authorize.Net 'hold for review' status shows up as 'declined' in Magento +Add Dynamic sku option for configurable products +Moneybookers Multistore System Configuration +Moneybookers OBT Defaults +PrototypeJS upgraded to 1.7 + +=== Changes === +Removed deprecation.js because its not compatible with prototype 1.7 +Relations between models and resource models were revised for better support of multiple databases +- Varien_Db_Adapter_Pdo_Mysql revised +- Introduced Varien_Db_Adapter_Interface, Varien_Db_Ddl_Table +- Introduced new classes named resource helpers +- Backwards comatibility and known issues +-- Error appears after Customer Group saving with name length more than 32 +Deprecated GoogleBase module (http://googlemerchantblog.blogspot.com/2010/12/new-shopping-apis-and-deprecation-of.html) +- Google Shopping Extension is available for the replacement + +=== Fixes === +Fixed Google checkout shipping (merchant and carrier calculated) returns only default prices +Fixed Custom option prices for simple products are GLOBAL +- fixed website price scope for simple products when product is linked to few websites with separate store views +Fixed Custom Price for Bundled Product should be disabled in Admin Panel +Fixed Configurable products. Incorrect pricing with super attributes price in percents +- percentage of price is taken from final product price +Fixed Label of system Customer Attribute, that was changed, is not displayed +Fixed Taxes are not correctly calculated if bundle with dynamic price is about to partially return +Fixed No ability to create Shipping Labels with several packages (in case with decimals Qty of products) +Fixed Special symbols as search keywords return error page +Fixed Changes in URL rewrite suffix cannot be reverted +Fixed Taxes are not correctly calculated if bundle with dynamic price is about to partially return +Fixed Product is deleted from shopping cart by editing grouped product +Fixed Product view page doesn't reflect last visited category +Fixed Customer is linked in order even if it is deleted from Magento +Fixed Exception is shown when Email to a Friend page is opened using URL in case when this feature is disabled +Fixed Missing "?" placeholders in class Varien_Cache_Backend_Database +Fixed There are no server side validation of first character of Attribute Code (it should be letter) +Fixed Edit cart item return unnecessary error message +Fixed Product Custom Option values titles are not saved +Fixed Newsletters are not sent +Fixed Preview URL for CMS Pages template contain two question mark +Fixed Partial refund orders with downloadable products affect status of all downloadable links +Fixed AddToCart takes forever if a configurable has massive count of child products +Fixed Mage_Tag_IndexController::saveAction() contains business logic of creating tag relation +Fixed Frontend: If second customer logs in and does not select the "Remember Me" then the previous long-term cookie does not removes +Fixed Frontend: After new customer registration with "Remember Me" and pressing "Logout" the long-term cookie session doesn't apply if in configuration on backend ""Remember Me" Default Value" - No +Fixed Currency problems. Back office TAX calculation on the product edit page +Fixed UPS shipping quotes are incorrect +Fixed Quote CollectTotals performance issue +Fixed PayPal Checkout Error Duplicate Order ID +- added additional exception handling which sets transaction to pending +Fixed In report Products Ordered configurable and its associated simple product appear and are counted +Fixed Multi select attributes not importing/exporting correctly +Fixed Google Bot User Agent and compare product issue +Fixed Bundle price display issue with tier pricing +Fixed No validation of Customs Value field +Fixed Form for adding new customer is shown instead customer's information page +- correct customer ID passed to URL generator +Fixed With IE9 impossible to do drag and drop actions in Admin +- added support of Range.createContextualFragment for IE9 +Fixed Countries with no Zip code still have it as required field in address +Fixed Anchor category does not display products from subcategories +Fixed Place of "Options Details" is wrong in wishlist for composite products +Fixed 3D Secure + PayPal Website Payments Pro in UK prevents non-3D secure cards from working +Fixed When creating new order for customer registered on multiple websites, account/website mismatch causes issues +Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend +Fixed Global variables in js.js +Fixed Observers from adminhtml are do not work when use Soap +Fixed Item quantity changed to 1 if added space +Fixed Row total is incorrectly calculated as negative number +Fixed HTML validation fails for pages with multiple grids +Fixed Can not log in to MCM if connect.cfg is incorrect +Fixed Incorrect use of chmod in Varien_Io_File::streamClose() +Fixed Unable to return full amount on PayPal if partial credit memo is done and customer applied Store Credit +Fixed Import Issue when attribute values not unique +Fixed Wrong customer group in order creation process in Admin panel +Fixed "Unable to save invoice" message appears when admin captures money when authorization transaction is no longer valid +Fixed Wishlist doesn't save configured composite products if MAP is enabled +Fixed Empty items grid is present, after deleting last item +Fixed Incorrect Tax Calculation when "Apply Tax On:Original price only" but custom price is not entered +Fixed Unable to place order with Authorize.net Direct Post payment method in IE 9 +Fixed Ability to bypass configuration setting for the Admin area URL route +Fixed Ability to create package with decimals Qty of products, for which "Qty Uses Decimals" set to "No" +Fixed Excess semicolon in warning message, during creating Shipping Labels (in case with invalid Packaging Type) +Fixed msrp_display_actual_price_type (MAP:Display Actual Price) field is not exported +Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals +Fixed Incorrect warning message, after Additions products with Qty that exceeds maximum available quantity +Fixed Catalog price rule doesn't work with contains condition and value which contains only cents +Fixed No store base currency beside Customs Value +Fixed Catalog Price Rule not applying to imported products +Fixed Incorrect "Shipper" and "Ship to" information in Shipping Label (in case with UPS) +Fixed Images are not imported via new Import functionality +Fixed Packages Print looks incorrectly +Fixed MAP. In the JS pop-up link "Checkout with PayPal" displayed only under FF +Fixed Extra double-quote in transactional email template app/locale/en_US/template/email/password_new.html +Fixed No ability to create Shipping Label for product with non-integer weight in Ounces (USPS - First-Class Mail International Package) +Fixed Layout issue if RSS is On +Fixed Previous customer information stays on the page header while one page checkout in process +Fixed Out of Stock Configurable product is displayed as In Stock +Fixed In the up-sell products "click to see price" link displayed, when settings "In cart", "Before Order Confirmation" is used +Fixed MAP. On the onepage, in the Wishlist block, link "Click for Price" is not active +Fixed Frontend: the products in Shopping Cart is transferred to other customer, if this customer is logged in in "My Account" page +Fixed Wrong prices are displayed for placed order with downloadable product +Fixed Shipping amount display issue when placing an order on the backend +Fixed Length, Width, Height are not passed to shipping carrier, during package creation (in case with DHL) +Fixed Disabled fields in Create Packages Pop-up with Girth field looks incorrectly +Fixed Customer address that affect tax calculation does not affect persistent customer +Fixed Ability to create more products in Shipping Labels than products in the order/shipment (in case with decimals Qty of products) +Fixed No ability to create Shipping Labels with several packages (in case with decimals Qty of products) +Fixed Formed items grid looks incorrectly, during package creation +Fixed Incorrect total weight of bundle product +Fixed Shopping Cart Rule Not Working Properly +Fixed Javascript error on "forgot your password" validation +Fixed When custom price is applied on an order in the admin, Price Incl tax on the order is the same as Excl tax +Fixed Edit cart item return unnecessary error message +Fixed Unable to save HTML code in attribute options +Fixed In the Wishlist text message appears in 2 rows, when MAP is applied for product that is in the wishlist +Fixed Unable to apply coupon code to order with zero subtotal +Fixed Nonexistent blank option in multiple select form attribute +Fixed Cannot add widget to packages or themes containing underscore in name +Fixed Product's sort order by position works incorrect with negative numbers +- allowed negative numbers +- corrected sorting by position +Fixed Incorrect Grand Total calculation when "Buy X get Y free" discount applied +Fixed Wrong product's quantity in the Wishlist after updating 'Shopping Cart' +Fixed Unneeded URL translation in admin template +Fixed Incorrect subtotal on invoice creation page (Order with Tax and Discount) +- hidden tax amount was added to collect process +Fixed When we add new address to address book during onepage checkout, not shown customer address attributes are taken from saved address attribute value +Fixed Street Address input box missing on create order form in admin +Fixed MAP enabled. In the wishlist block product price displayed when it should not +Fixed Qty field is not disabled if even check-box unselected +Fixed No ability to create Shipping Label with decimals Qty of products (in case with FedEx International) +Fixed FedEx Shipping Method unavailable (in case with Request Courier drop off type) +Fixed Unable to upgrade Magento when installed extension without max version +Fixed Wrong calculation price of Bundle product +- fixed sub item prices calculation +Fixed Incorrect products weight in Shipping Label (in case with USPS Int.,FedEx Int. and decimal Qty) +Fixed Gateway URL Absent in FedEx Shipping Module +Fixed Google checkout shipping (merchant and carrier calculated) returns only default prices +Fixed Frontend: the products in the Shopping Cart is not transferred to other customer, if this customer is logged in or register after clicks on "Checkout with Multiple Addresses", "Google Checkout" or "PayPal" +Fixed Unable to login to site after adding SID to URL +Fixed Image in description doesn't shown in compare grid +Fixed Missed validation for space charter in begin of unique fields +Fixed Impossible to sort blocks +Fixed Incorrect behavior of Offline Refunds for an Order when Adjustment fee is specified +Fixed Order saving error on backend +Fixed Customer logged out by wrong SID cached in blocks +Fixed System->Configuration->Advanced->Admin->Startup page->"Startup Page" drop-down - Optgroups are displayed after child elements +Fixed Removed unused code from Varien_File_Uploader +Fixed DHL Shipping Methods unavailable (in case with package type letter) +Fixed Error via using Global Search [Search in Admin] +Fixed Error is presented by saving address, creating order with created attributes type Image File or file(attachment) +Fixed Package contents should be specified dynamically while creating shipping labels for the USPS International shipping methods +Fixed Product option with file type input is not being transferred from wishlist to the cart +- add mergeBuyRequest method to Mage_Wishlist_Model_Item +- add checking of custom add to cart URL in Mage_Catalog_Block_Product_View +Fixed Import: Imported file is not saved to var/importexport +Fixed Reports for Sales do not work except PayPal Settlement if several order statutes were selected +Fixed No disabling of package type and dimensions fields (in case with USPS Domestic) +Fixed Wrong behavior of composite configurable product during adding to the Shopping Cart via backend +Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up +- added/removed several methods/packages for UPS shipping according to SRS +Fixed "Notify for Quantity Below" does not work +Fixed Frontend: Tier price not always applied to Mini Shopping Cart +Fixed Void button is present on Order page, Authorization transaction is not closed when payment action is set to "authorize and charge" - Google Checkout +Fixed MAP is applied to a Bundle product with dynamic price +Fixed No ability to create Shipping Label with package size "Oversize" +Fixed Button "Add to Cart" located in JS-popup (with Display Actual Price = On Gesture) doesn't work +Fixed Incorrect Shipping Label for USPS Library Mail Shipping Methods +Fixed Duplicating customer's addresses through placing order (backend) +Fixed Updating the qty of products from backend does not allow checkout on Frontend +- added ability to Quote and Quote items to track errors and remove them, when fixed, so whole 'error' status from Quote/Quote Item can be removed +- removed duplicating messages on Cart View page +Fixed No ability to create Shipping Label even if "Residential Delivery" set to "Yes" (in case with FedEx Home Delivery) +Fixed Button "Add new address" for customer works incorrect (backend) +Fixed It should be possible to set Minimum Qty Allowed in Shopping Cart setting via backend +Fixed Cart Subtotal is shown incorrect in sidebar shopping cart +Fixed Grid/list view settings do not save +Fixed Cannot assign custom filter to the grid column +Fixed Wishlist - product custom options are lost after customer login +Fixed Saved products will be matched each target rule +Fixed Taxes are not displayed in the catalog from frontend for Bundle products +- re-factored work with taxes for bundle product +Fixed Unable to save year less than 1970 in DOB customer attribute +- added DATETIME type to DDL +- fixed customer attributes to have same as pre-MMDB default values +Fixed "Grand Total" is not displayed for a configurable product that contains product where DAP = display before order confirmation +Fixed 'Click for price' not clickable after pressing 'Review' link in category +Fixed Bundle price display issue with tier pricing +- not considering tier price at bundle product's view page in price range +Fixed Frontend: In the block "Recently Viewed Products" the products of two customers are mixed +Fixed Error with Advanced Search (in case with Date Attribute) +Fixed Tax Rate ignores set values of Post/Zip codes Range From-To and applies it to Address with any Zip codes +Fixed Wishlist - Comment lost on config update +Fixed Import cannot handle UTF-8 characters +Fixed Welcome email template for store view scope is being ignored +Fixed Incorrect behavior of bundle product during creating Shipping Label with Customs value (in case when Price: Fixed, Ship Bundle Items" set to Separately) +Fixed Order status isn't changed when payed via PayPal if registered email differs characters cases (upper and lower) +Fixed Unwanted orders are shown in Sales->Orders list when the date filter affects to the day when DST changes apply +Fixed Payment method "Credit Card (saved)" does not display fields for fill in card information when product price is 0.00 +Fixed Available to create online invoice after performing void for order +Fixed MAP configuration must contain default text for "Default Popup Text Message" and "Default "What's This" Text Message" +Fixed Backwards compatibility loss results in fatal error in Google Shopping module +- added all previous DDL constants to DDL Table, they are deprecated and being converted to new supported types +- added support for 'char' attributes +- fixed several incompatibilities in DDL Table +Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International) +Fixed Frontend: The block "Compare Products" with product is present on catalog page after adding the product to this block and clicking on "Not..?" +Fixed Fatal error when trying to open configurable product with super attribute not in the appropriate attribute set +Fixed Unable to return full amount on PayPal if partial credit memo is done and customer applied Store Credit +Fixed When creating new order for customer registered on multiple websites, account/website mismatch causes issues +Fixed Import Issue when attribute values not unique +Fixed After upgrading Magento website left in the maintenance mode +Fixed Ability to create more Shipping Labels than products in the order(shipment) +Fixed Street Address and Street Address 2 are mixed up in request to shipping carrier (in case with USPS International) +Fixed PayflowLink doesn't work (error "Payment has been declined. Please try again." is shown, Order is canceled) +Fixed Shopping cart price rule with attribute does not work when "Use Flat Catalog Product" enabled +Fixed Upgrade checking after cache flushed +Fixed Frontend: Tier price not always applied to Mini Shopping Cart +Fixed A message for the case when shipping label is created from the order should be modified +Fixed Spelling mistake in abbreviations unit of mass measurement (lbs, kgs) +Fixed FedEx Ground Shipping Method unavailable (if others FedEx Shipping Methods unavailable) +Fixed Incorrect Signature Confirmation options in the drop-down (in case with UPS) +Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer +- add recollect total prices for quote on customer register +Fixed Fatal error when requesting non-existent file from Media directory +Fixed Button "Add to Cart" located in JS-popup (with Display Actual Price = On Gesture) doesn't work +Fixed Headers sent twice or three times when file downloading +Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend +Fixed No ability to create more that one online Partial Invoice with Google Checkout +- parent transaction will be closed on payment model level; +- fixed exception error in Mage_Tax_Model_Resource_Calculation +Fixed Cross Sell Sorting Not Working +Fixed No ability to create Shipping Label for USPS - First-Class Mail International Package +Fixed Notification remove link in admin redirects to homepage on frontend in IE8 +Fixed Incorrect behavior of image gallery +Fixed 'On Gesture' option is not applied on products' level +Fixed The message that appears instead or totals in the shopping cart and mini shopping cart should be modified +Fixed Void button present when order is fully invoiced +Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International) +Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present) +Fixed PayflowLink doesn't work (error "Payment has been declined. Please try again." is shown, Order is canceled) +Fixed Incorrect Online Refund amount in Magento, when Adjustment Fee is specified (Google Checkout) +Fixed Brazil PayPal requirements upgrade +Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International) +Fixed Issue with add to cart action, possible to add to cart a quantity of N+1 for a product +Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS) +Fixed Wrong content in export file (all export types) +Fixed "Mysql" must be renamed to "MySQL" in installer +Fixed File overwriting during Import/Export +Fixed Reuse of adapter utilities in helper +Fixed MAP behavior for RSS feed pages should be changed (only "Click for price" link should be present) +Fixed When changing locale that has Unicode characters, the countries are not sorting correctly +Fixed Importing customers via CSV +Fixed Two void transactions created when using Payment Action = Order in PayPal Express +Fixed Issue with newsletter subscriptions and logged in customers +Fixed Frontend: Long-term cookie session is not over after click on "(Not..?)" link +Fixed Mismatch counts of products for different scope +Fixed Wrong config setting are implemented for MAP functionality in admin on product's level +Fixed Street Address and Street Address 2 are mixed up in request to shipping carrier (in case with USPS International) +Fixed No ability to create Shipping Label if "ship to" in Canada (in case with UPS) +- fixed MonetaryValue to be whole number +Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up +Fixed Add verification into predispatch observers used in persistent shopping cart +Fixed Canceled orders should be excluded from Tax Reports +Fixed No ability to create Shipping Label with package type "Flat-Rate Box" (in case with USPS International) +Fixed Import/Export: Append Complex Data works incorrect with grouped products +- check behavior was added +Fixed Fatal error appears on get shipping rates for UPS if system base currency <> merchant country currency +Fixed Map in the frontend link has "Click to see price" name, but must be "Click for price" +Fixed Taxes are not displayed in the catalog from frontend for Bundle products +Fixed Available to delete drop down attribute which used in configurable product +Fixed MySQL error with "max_allowed_packet" during check data step for a huge .csv file +- Changed value for constant DB_MAX_PACKET_COEFFICIENT in Mage_ImportExport_Model_Resource_Helper_Mysql4 +Fixed Invalid requests to USPS API +Fixed No ability to input some value in dimensions field in case for package type with non-standard dimensions +Fixed Packages Pop-up looks incorrectly +Fixed Caching config in Database results in endless recursion +Fixed No Signature Confirmation in Packages pop-up +Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up +Fixed "NaN" instead of two dashes in Package pop-up (in case with disabled Length, Width and Height fields) +Fixed Prefix and suffix aren't visible in Register Form +- Modified persistent customer templates +Fixed Unable to Checkout with Multiple Addresses with Registration +Fixed Not work shipping methods Fedex & DHL +- Re-factored DHL, FedEx, Ups, USPS +- Fixed minor bugs for frontend(package.phtml, view.phtml) and backend (popup.phtml, shippingmethod.phtml) +Fixed When we do reindex from console, folder var/log changes permissions from 0777 to 0775 +Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up +Fixed Orders placed through PayPal marked as "Suspected Fraud" +- Added formatting amount into comparing +Fixed Enable Log Cleaning option is not working properly +Fixed Incorrect transparency of PNG image in indexed non-alpha mode +Fixed Value from Total Weight field is not passed to shipping carrier (in case with DHL and UPS) +Fixed After enabling dashboard chart admin user is unable to login to admin panel +Fixed Sorting on Please Select products to Add doesn't work +Fixed Catalog Price Rules - the rule is saved but not applied +Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up +Fixed Cross Sell Sorting Not Working +Fixed Error when obtaining missed file over get.php +Fixed Package Types that not available for current Shipping Method displayed in Create Packages pop-up +Fixed Unable to save Poll for more than one Store +Fixed Mage_Directory_Helper_Data::getRegionJson doesn't translate region names +Fixed Static block in the Main Content Area overlaps border of the catalog of products +Fixed 3D secure with Saved CC works incorrectly +Fixed Unable add Gift Options for Individual Items +Fixed Customer Reports +- avoid selections group by null customer id +Fixed Mysql4 install error +Fixed "What's this?" link is absent, "Click for price" link doesn't work for shared Wishlist page +Fixed Incorrect Row Total Calculation in Refund +- changed tax counting algorithm(now it counts tax for single item) +Fixed Incorrect recipient name of Shipping Label +Fixed Missing "Street Address Line 2" in Shipping Label (in case with DHL) +Fixed After upgrading Magento website left in the maintenance mode +Fixed Frontend: JavaScript error appears if user registered on Checkout Page +Fixed Added items to the Wishlist in the "Manage Shopping Cart" are not shown +Fixed Information is not saved in DB after placing order during checkout +Fixed Reports data wrong even after refreshing lifetime statistics +Fixed Frontend can be broken by recursion +Fixed Sub items are not displayed for the order for bundles, if user use Return and Orders link +- added renderers for non-simple product types +Fixed Error message for the case when store information is incomplete should be changed +Fixed MAP behavior for RSS feed pages should be changed accordingly to SRS (only "Click for price" link should be present) +Fixed Exception after upgrade Magento via diff files +Fixed Frontend: The block "Compare Products" is empty after relogin +Fixed Frontend: Catalog Price Rule does not apply to Mini Shopping Cart after login current customer +- remove checking if customerGroupId exists because quote is loaded with existed customerGroupId as guest +Fixed Unable to delete product with tag in pending status +Fixed Images not imported using new Import/Export + +=== Known issues === +If you see the Service Temporarily Unavailable page after refreshing the frontend, open the Magento installation directory on the server and remove the maintenance.flag file. Then go to Magento var directory and remove the cache directory +- this issue only exists immediately after upgrading correct +Incorrect address in request to shipping carrier (DHL International) in case when address contains letter with diacritic +No ability to save created package when origin address in Germany (in case with UPS Express) +Two products are in the same row in Shipping Label (in case with FedEx International Priority) +Incorrect tracking number in the Shipping Label (in case with "Federal Express - Ground" shipping method) +No ability to save created package when origin and destination in Europe (in case with UPS Standard) + + + +==== 1.6.x-devel-115929 ==== + +=== Fixes === +Fixed Currency problems. Back office TAX calculation on the product edit page +Fixed UPS shipping quotes are incorrect +Fixed Quote CollectTotals performance issue +Fixed PayPal Checkout Error Duplicate Order ID +- added additional exception handling which sets transaction to pending +Fixed In report Products Ordered configurable and its associated simple product appear and are counted +Fixed Multi select attributes not importing/exporting correctly +Fixed Google Bot User Agent and compare product issue +Fixed Bundle price display issue with tier pricing +Fixed No validation of Customs Value field +Fixed Form for adding new customer is shown instead customer's information page +- correct customer ID passed to URL generator +Fixed With IE9 impossible to do drag and drop actions in Admin +- added support of Range.createContextualFragment for IE9 +Fixed Countries with no Zip code still have it as required field in address +Fixed Anchor category does not display products from subcategories +Fixed Place of "Options Details" is wrong in wishlist for composite products +Fixed 3D Secure + PayPal Website Payments Pro in UK prevents non-3D secure cards from working +Fixed When creating new order for customer registered on multiple websites, account/website mismatch causes issues +Fixed Shipping method is calculating based on default shipping address instead of 'Same as billing' setting in backend +Fixed Global variables in js.js +Fixed Observers from adminhtml are do not work when use Soap +Fixed Item quantity changed to 1 if added space +Fixed Row total is incorrectly calculated as negative number +Fixed HTML validation fails for pages with multiple grids +Fixed Can not log in to MCM if connect.cfg is incorrect +Fixed Incorrect use of chmod in Varien_Io_File::streamClose() +Fixed Unable to return full amount on PayPal if partial credit memo is done and customer applied Store Credit +Fixed Import Issue when attribute values not unique +Fixed Wrong customer group in order creation process in Admin panel +Fixed "Unable to save invoice" message appears when admin captures money when authorization transaction is no longer valid +Fixed Whishlist doesn't save configured composite products if MAP is enabled +Fixed Empty items grid is present, after deleting last item +Fixed Incorrect Tax Calculation when "Apply Tax On:Original price only" but custom price is not entered +Fixed Unable to place order with Authorize.net Direct Post payment method in IE 9 +Fixed Ability to bypass configuration setting for the Admin area URL route +Fixed Ability to create package with decimals Qty of products, for which "Qty Uses Decimals" set to "No" +Fixed Excess semicolon in warning message, during creating Shipping Labels (in case with invalid Packaging Type) +Fixed msrp_display_actual_price_type (MAP:Display Actual Price) field is not exported +Fixed Incorrect Customs Value in Create Packages in case when price value contains decimals +Fixed Incorrect warning message, after Additions products with Qty that exceeds maximum available quantity +Fixed Catalog price rule doesn't work with contains condition and value which contains only cents +Fixed No store base currency beside Customs Value +Fixed Catalog Price Rule not applying to imported products +Fixed Incorrect "Shipper" and "Ship to" information in Shipping Label (in case with UPS) +Fixed Images are not imported via new Import functionality +Fixed Packages Print looks incorrectly +Fixed MAP. In the JS pop-up link "Checkout with PayPal" displayed only under FF +Fixed Extra double-quote in transactional email template app/locale/en_US/template/email/password_new.html +Fixed No ability to create Shipping Label for product with non-integer weight in Ounces (USPS - First-Class Mail International Package) +Fixed Layout issue if RSS is On +Fixed Previous customer information stays on the page header while one page checkout in process +Fixed Out of Stock Configurable product is displayed as In Stock +Fixed In the up-sell products "click to see price" link displayed, when settings "In cart", "Before Order Confirmation" is used +Fixed MAP. On the onepage, in the Wishlist block, link "Click for Price" is not active +Fixed Frontend: the products in Shopping Cart is transferred to other customer, if this customer is logged in in "My Account" page +Fixed Wrong prices are displayed for placed order with downloadable product +Fixed Shipping amount display issue when placing an order on the backend +Fixed Length, Width, Height are not passed to shipping carrier, during package creation (in case with DHL) +Fixed Disabled fields in Create Packages Pop-up with Girth field looks incorrectly +Fixed Customer address that affect tax calculation does not affect persistent customer +Fixed Ability to create more products in Shipping Labels than products in the order/shipment (in case with decimals Qty of products) +Fixed No ability to create Shipping Labels with several packages (in case with decimals Qty of products) +Fixed Formed items grid looks incorrectly, during package creation +Fixed Incorrect total weight of bundle product +Fixed Shopping Cart Rule Not Working Properly +Fixed Javascript error on "forgot your password" validation +Fixed When custom price is applied on an order in the admin, Price Incl tax on the order is the same as Excl tax +Fixed Edit cart item return unnecessary error message +Fixed Unable to save HTML code in attribute options +Fixed In the Wishlist text message appears in 2 rows, when MAP is applied for product that is in the wishlist +Fixed Unable to apply coupon code to order with zero subtotal +Fixed Nonexistent blank option in multiple select form attribute +Fixed Cannot add widget to packages or themes containing underscore in name +Fixed Product's sort order by position works incorrect with negative numbers +- allowed negative numbers +- corrected sorting by position +Fixed Incorrect Grand Total calculation when "Buy X get Y free" discount applied +Fixed Wrong product's quantity in the Wishlist after updating 'Shopping Cart' +Fixed Unneeded URL translation in admin template +Fixed Incorrect subtotal on invoice creation page (Order with Tax and Discount) +- hidden tax amount was added to collect process +Fixed When we add new address to address book during onepage checkout, not shown customer address attributes are taken from saved address attribute value. +Fixed Street Address input box missing on create order form in admin +Fixed MAP enabled. In the wishlist block product price displayed when it should not +Fixed Qty field is not disabled if even check-box unselected +Fixed No ability to create Shipping Label with decimals Qty of products (in case with FedEx International) +Fixed FedEx Shipping Method unavailable (in case with Request Courier drop off type) +Fixed Unable to upgrade Magento when installed extension without max version +Fixed Wrong calculation price of Bundle product +- fixed sub item prices calculation +Fixed Incorrect products weight in Shipping Label (in case with USPS Int.,FedEx Int. and decimal Qty) +Fixed Gateway URL Absent in Fedex Shipping Module +Fixed Google checkout shipping (merchant and carrier calculated) returns only default prices +Fixed Frontend: the products in the Shopping Cart is not transferred to other customer, if this customer is logged in or register after clicks on "Checkout with Multiple Addresses", "Google Checkout" or "PayPal" +Fixed Unable to login to site after adding SID to URL +Fixed Image in description doesn't shown in compare grid +Fixed Missed validation for space charter in begin of unique fields +Fixed Impossible to sort blocks +Fixed Incorrect behavior of Offline Refunds for an Order when Adjustment fee is specified +Fixed Order saving error on backend +Fixed Customer logged out by wrong SID cached in blocks +Fixed System->Configuration->Advanced->Admin->Startup page->"Startup Page" drop-down - Optgroups are displayed after child elements +Fixed Removed unused code from Varien_File_Uploader +Fixed DHL Shipping Methods unavailable (in case with package type letter) +Fixed Error via using Global Search [Search in Admin] +Fixed Error is presented by saving address, creating order with created attributes type Image File or file(attachment) + + + ==== 1.6.0.0-rc2 ==== === Major Highlights === diff --git a/app/Mage.php b/app/Mage.php index 856ee9b9a1..3760a1ce98 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -154,8 +154,8 @@ public static function getVersionInfo() 'minor' => '6', 'revision' => '0', 'patch' => '0', - 'stability' => 'rc', - 'number' => '2', + 'stability' => '', + 'number' => '', ); } diff --git a/app/code/community/Find/Feed/Model/Import.php b/app/code/community/Find/Feed/Model/Import.php index f72041f037..c97ca991a3 100755 --- a/app/code/community/Find/Feed/Model/Import.php +++ b/app/code/community/Find/Feed/Model/Import.php @@ -116,7 +116,11 @@ protected function _createFile() $attributesRow = array(); foreach ($attributes as $key => $value) { if ($this->_checkAttributeSource($product, $value)) { - $attributesRow[$key] = $product->getAttributeText($value); + if (is_array($product->getAttributeText($value))) { + $attributesRow[$key] = implode(', ', $product->getAttributeText($value)); + } else { + $attributesRow[$key] = $product->getAttributeText($value); + } } else { $attributesRow[$key] = $product->getData($value); } diff --git a/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php b/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php index 5555a65def..18926eddc2 100644 --- a/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +++ b/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php @@ -102,7 +102,7 @@ ), 'password' => array( 'type' => Varien_Db_Ddl_Table::TYPE_TEXT, - 'length' => 40, + 'length' => 100, 'comment' => 'User Password' ), 'created' => array( diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php index 68bdeeb329..70b2416579 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php @@ -24,12 +24,18 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Block_Cms_Page_Grid_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract +class Mage_Adminhtml_Block_Cms_Page_Grid_Renderer_Action + extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $row) { $urlModel = Mage::getModel('core/url')->setStore($row->getData('_first_store_id')); - $href = $urlModel->getUrl('', array('_current'=>false)) . "{$row->getIdentifier()}?___store={$row->getStoreCode()}"; + $href = $urlModel->getUrl( + $row->getIdentifier(), array( + '_current' => false, + '_query' => '___store='.$row->getStoreCode() + ) + ); return ''.$this->__('Preview').''; } } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php index 87ec8ea558..1f63a781e1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php @@ -123,6 +123,10 @@ public function initForm() ->initDefaultValues(); $attributes = $addressForm->getAttributes(); + if(isset($attributes['street'])) { + Mage::helper('adminhtml/addresses') + ->processStreetAttribute($attributes['street']); + } foreach ($attributes as $attribute) { $attribute->unsIsVisible(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php index 6b2761a828..9daeae6fe2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php @@ -105,7 +105,12 @@ protected function _prepareForm() $addressForm = $this->_getAddressForm() ->setEntity($addressModel); - $this->_addAttributesToForm($addressForm->getAttributes(), $fieldset); + $attributes = $addressForm->getAttributes(); + if(isset($attributes['street'])) { + Mage::helper('adminhtml/addresses') + ->processStreetAttribute($attributes['street']); + } + $this->_addAttributesToForm($attributes, $fieldset); $prefixElement = $this->_form->getElement('prefix'); if ($prefixElement) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php index d0c2a72339..ca65d53c32 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php @@ -178,11 +178,28 @@ public function getQuoteAddress() } } + /** + * Define if specified item has already applied custom price + * + * @param Mage_Sales_Model_Quote_Item $item + * @return bool + */ public function usedCustomPriceForItem($item) { return $item->hasCustomPrice(); } + /** + * Define if custom price can be applied for specified item + * + * @param Mage_Sales_Model_Quote_Item $item + * @return bool + */ + public function canApplyCustomPrice($item) + { + return !$item->isChildrenCalculated(); + } + public function getQtyTitle($item) { $prices = $item->getProduct()->getTierPrice(); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php index df9fc65a08..60a0ecb44a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php @@ -31,7 +31,8 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract +class Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form + extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract { protected $_rates; @@ -138,6 +139,16 @@ public function getIsRateRequest() public function getShippingPrice($price, $flag) { - return $this->getQuote()->getStore()->convertPrice(Mage::helper('tax')->getShippingPrice($price, $flag, $this->getAddress()), true); + return $this->getQuote()->getStore()->convertPrice( + Mage::helper('tax')->getShippingPrice( + $price, + $flag, + $this->getAddress(), + null, + //We should send exact quote store to prevent fetching default config for admin store. + $this->getAddress()->getQuote()->getStore() + ), + true + ); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php index 7390704e0d..7b12d64e53 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php @@ -66,11 +66,12 @@ public function getConfigDataJson() $createLabelUrl = $this->getUrl('*/sales_order_shipment/createLabel', $urlParams); $itemsGridUrl = $this->getUrl('*/sales_order_shipment/getShippingItemsGrid', $urlParams); foreach ($this->getShipment()->getAllItems() as $item) { - $itemsQty[$item->getId()] = $item->getQty(); - $itemsPrice[$item->getId()] = $item->getPrice(); - $itemsName[$item->getId()] = $item->getName(); - $itemsWeight[$item->getId()] = $item->getWeight(); - $itemsProductId[$item->getId()] = $item->getProductId(); + $itemsQty[$item->getId()] = $item->getQty(); + $itemsPrice[$item->getId()] = $item->getPrice(); + $itemsName[$item->getId()] = $item->getName(); + $itemsWeight[$item->getId()] = $item->getWeight(); + $itemsProductId[$item->getId()] = $item->getProductId(); + $itemsOrderItemId[$item->getId()] = $item->getOrderItemId(); } } else if ($orderId) { $urlParams['order_id'] = $orderId; @@ -78,25 +79,27 @@ public function getConfigDataJson() $itemsGridUrl = $this->getUrl('*/sales_order_shipment/getShippingItemsGrid', $urlParams); foreach ($this->getShipment()->getAllItems() as $item) { - $itemsQty[$item->getOrderItemId()] = $item->getQty()*1; - $itemsPrice[$item->getOrderItemId()] = $item->getPrice(); - $itemsName[$item->getOrderItemId()] = $item->getName(); - $itemsWeight[$item->getOrderItemId()] = $item->getWeight(); - $itemsProductId[$item->getOrderItemId()]= $item->getProductId(); + $itemsQty[$item->getOrderItemId()] = $item->getQty()*1; + $itemsPrice[$item->getOrderItemId()] = $item->getPrice(); + $itemsName[$item->getOrderItemId()] = $item->getName(); + $itemsWeight[$item->getOrderItemId()] = $item->getWeight(); + $itemsProductId[$item->getOrderItemId()] = $item->getProductId(); + $itemsOrderItemId[$item->getOrderItemId()] = $item->getOrderItemId(); } } $data = array( - 'createLabelUrl' => $createLabelUrl, - 'itemsGridUrl' => $itemsGridUrl, - 'errorQtyOverLimit' => Mage::helper('sales')->__('The quantity you want to add exceeds the total shipped quantity for'), - 'titleDisabledSaveBtn' => Mage::helper('sales')->__('Products should be added to package(s)'), - 'validationErrorMsg' => Mage::helper('sales')->__('The value that you entered is not valid. Please use numeric value.'), - 'shipmentItemsQty' => $itemsQty, - 'shipmentItemsPrice' => $itemsPrice, - 'shipmentItemsName' => $itemsName, - 'shipmentItemsWeight' => $itemsWeight, - 'shipmentItemsProductId' => $itemsProductId, - 'customizable' => $this->_getCustomizableContainers(), + 'createLabelUrl' => $createLabelUrl, + 'itemsGridUrl' => $itemsGridUrl, + 'errorQtyOverLimit' => Mage::helper('sales')->__('The quantity you want to add exceeds the total shipped quantity for some of selected Product(s)'), + 'titleDisabledSaveBtn' => Mage::helper('sales')->__('Products should be added to package(s)'), + 'validationErrorMsg' => Mage::helper('sales')->__('The value that you entered is not valid.'), + 'shipmentItemsQty' => $itemsQty, + 'shipmentItemsPrice' => $itemsPrice, + 'shipmentItemsName' => $itemsName, + 'shipmentItemsWeight' => $itemsWeight, + 'shipmentItemsProductId' => $itemsProductId, + 'shipmentItemsOrderItemId' => $itemsOrderItemId, + 'customizable' => $this->_getCustomizableContainers(), ); return Mage::helper('core')->jsonEncode($data); } @@ -174,6 +177,21 @@ public function getDeliveryConfirmationTypeByCode($code) return ''; } + /** + * Return name of content type by its code + * + * @param string $code + * @return string + */ + public function getContentTypeByCode($code) + { + $contentTypes = $this->getContentTypes(); + if (!empty($contentTypes[$code])) { + return $contentTypes[$code]; + } + return ''; + } + /** * Get packed products in packages * @@ -301,4 +319,40 @@ public function getContentTypes() } return array(); } + + /** + * Get Currency Code for Custom Value + * + * @return string + */ + public function getCustomValueCurrencyCode() + { + return Mage::app()->getStore()->getBaseCurrencyCode(); + } + + /** + * Display formatted price + * + * @param float $price + * @return string + */ + public function displayPrice($price) + { + return $this->getShipment()->getOrder()->formatPriceTxt($price); + } + + /** + * Get ordered qty of item + * + * @param int $itemId + * @return int|null + */ + public function getQtyOrderedItem($itemId) + { + if ($itemId) { + return $this->getShipment()->getOrder()->getItemById($itemId)->getQtyOrdered()*1; + } else { + return; + } + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php index e890537526..4adcd860bd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php @@ -79,7 +79,7 @@ public function getCustomerGroupName() public function getCustomerViewUrl() { - if ($this->getOrder()->getCustomerIsGuest()) { + if ($this->getOrder()->getCustomerIsGuest() || !$this->getOrder()->getCustomerId()) { return false; } return $this->getUrl('*/customer/edit', array('id' => $this->getOrder()->getCustomerId())); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php index 09f170ccf5..11a3531257 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php @@ -212,4 +212,33 @@ public function canDisplayGiftmessage() 'order_item', $this->getItem(), $this->getItem()->getOrder()->getStoreId() ); } + + /** + * Display susbtotal price including tax + * + * @param Mage_Sales_Model_Order_Item $item + * @return string + */ + public function displaySubtotalInclTax($item) + { + return $this->displayPrices( + $this->helper('checkout')->getBaseSubtotalInclTax($item), + $this->helper('checkout')->getSubtotalInclTax($item) + ); + } + + /** + * Display item price including tax + * + * @param Mage_Sales_Model_Order_Item $item + * @return string + */ + public function displayPriceInclTax(Varien_Object $item) + { + return $this->displayPrices( + $this->helper('checkout')->getBasePriceInclTax($item), + $this->helper('checkout')->getPriceInclTax($item) + ); + } + } diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php index 2ee941387b..e6dc2556bb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php @@ -115,7 +115,7 @@ protected function _prepareColumns() public function getRowUrl($row) { - return $this->getUrl('*/customer/edit', array('id' => $row->getCustomerId())); + return $this->getUrl('*/customer/edit', array('id' => $row->getId())); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php index 16a3a76dd2..8ffb587e94 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php @@ -197,8 +197,10 @@ protected function _setFieldset($attributes, $fieldset, $exclude=array()) $element->setAfterElementHtml($this->_getAdditionalElementHtml($element)); - if ($inputType == 'select' || $inputType == 'multiselect') { + if ($inputType == 'select') { $element->setValues($attribute->getSource()->getAllOptions(true, true)); + } else if ($inputType == 'multiselect') { + $element->setValues($attribute->getSource()->getAllOptions(false, true)); } else if ($inputType == 'date') { $element->setImage($this->getSkinUrl('images/grid-cal.gif')); $element->setFormat( diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php index a073af3e18..9e4d2d0488 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php @@ -31,37 +31,77 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Abstract extends Mage_Adminhtml_Block_Abstract implements Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Interface +class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Abstract extends Mage_Adminhtml_Block_Abstract + implements Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Interface { + /** + * Column related to filter + * + * @var Mage_Adminhtml_Block_Widget_Grid_Column + */ protected $_column; + /** + * Set column related to filter + * + * @param Mage_Adminhtml_Block_Widget_Grid_Column $column + * @return Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Abstract + */ public function setColumn($column) { $this->_column = $column; return $this; } + /** + * Retrieve column related to filter + * + * @return Mage_Adminhtml_Block_Widget_Grid_Column + */ public function getColumn() { return $this->_column; } + /** + * Retrieve html name of filter + * + * @return string + */ protected function _getHtmlName() { return $this->getColumn()->getId(); } + /** + * Retrieve html id of filter + * + * @return string + */ protected function _getHtmlId() { - return $this->getColumn()->getGrid()->getVarNameFilter().'_'.$this->getColumn()->getId(); + return $this->getColumn()->getGrid()->getId() . '_' + . $this->getColumn()->getGrid()->getVarNameFilter() . '_' + . $this->getColumn()->getId(); } - public function getEscapedValue($index=null) + /** + * Retrieve escaped value + * + * @param mixed $index + * @return string + */ + public function getEscapedValue($index = null) { return htmlspecialchars($this->getValue($index)); } + /** + * Retrieve condition + * + * @return array + */ public function getCondition() { $helper = Mage::getResourceHelper('core'); @@ -79,10 +119,14 @@ protected function _escapeValue($value) return str_replace('_', '\_', str_replace('\\', '\\\\', $value)); } + /** + * Retrieve filter html + * + * @return string + */ public function getHtml() { return ''; } } - diff --git a/app/code/core/Mage/Adminhtml/Helper/Addresses.php b/app/code/core/Mage/Adminhtml/Helper/Addresses.php new file mode 100644 index 0000000000..6ccfb65b63 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Helper/Addresses.php @@ -0,0 +1,51 @@ + + */ +class Mage_Adminhtml_Helper_Addresses extends Mage_Core_Helper_Abstract +{ + const DEFAULT_STREET_LINES_COUNT = 2; + + /** + * Check if number of street lines is non-zero + * + * @param Mage_Customer_Model_Attribute $attribute + * @return Mage_Customer_Model_Attribute + */ + public function processStreetAttribute(Mage_Customer_Model_Attribute $attribute) + { + if($attribute->getScopeMultilineCount() <= 0) { + $attribute->setScopeMultilineCount(self::DEFAULT_STREET_LINES_COUNT); + } + return $attribute; + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php index 8400c80e83..f8b15930a9 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php @@ -290,6 +290,10 @@ public function initFromOrder(Mage_Sales_Model_Order $order) $this->_initBillingAddressFromOrder($order); $this->_initShippingAddressFromOrder($order); + if (!$this->getQuote()->isVirtual() && $this->getShippingAddress()->getSameAsBilling()) { + $this->setShippingAsBilling(1); + } + $this->setShippingMethod($order->getShippingMethod()); $this->getQuote()->getShippingAddress()->setShippingDescription($order->getShippingDescription()); @@ -1439,9 +1443,6 @@ public function createOrder() $quote = $this->getQuote(); $this->_prepareQuoteItems(); - if (! $quote->getCustomer()->getId() || ! $quote->getCustomer()->isInStore($this->getSession()->getStore())) { - $quote->getCustomer()->sendNewAccountEmail('registered', '', $quote->getStoreId()); - } $service = Mage::getModel('sales/service_quote', $quote); if ($this->getSession()->getOrder()->getId()) { $oldOrder = $this->getSession()->getOrder(); @@ -1461,9 +1462,13 @@ public function createOrder() } $order = $service->submit(); - if (!$quote->getCustomer()->getId() || !$quote->getCustomer()->isInStore($this->getSession()->getStore())) { + if ((!$quote->getCustomer()->getId() || !$quote->getCustomer()->isInStore($this->getSession()->getStore())) + && !$quote->getCustomerIsGuest() + ) { $quote->getCustomer()->setCreatedAt($order->getCreatedAt()); - $quote->getCustomer()->save(); + $quote->getCustomer() + ->save() + ->sendNewAccountEmail('registered', '', $quote->getStoreId());; } if ($this->getSession()->getOrder()->getId()) { $oldOrder = $this->getSession()->getOrder(); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php index 2ae0f09a85..44fc4fb394 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php @@ -66,7 +66,7 @@ protected function _createOptions(&$optionArray, $menuNode) $children = array(); if(isset($menu['children'])) { - $this->_createOptions($optionArray, $menu['children']); + $this->_createOptions($children, $menu['children']); } $optionArray[] = array( diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php index 639a86d515..90af67c2d1 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -158,26 +158,26 @@ protected function _filterPostData($data) //labels foreach ($data['frontend_label'] as & $value) { if ($value) { - $value = $helperCatalog->stripTags($value); + $value = $helperCatalog->escapeHtml($value); } } //options if (!empty($data['option']['value'])) { foreach ($data['option']['value'] as &$options) { foreach ($options as &$label) { - $label = $helperCatalog->stripTags($label); + $label = $helperCatalog->escapeHtml($label); } } } //default value if (!empty($data['default_value'])) { - $data['default_value'] = $helperCatalog->stripTags($data['default_value']); + $data['default_value'] = $helperCatalog->escapeHtml($data['default_value']); } if (!empty($data['default_value_text'])) { - $data['default_value_text'] = $helperCatalog->stripTags($data['default_value_text']); + $data['default_value_text'] = $helperCatalog->escapeHtml($data['default_value_text']); } if (!empty($data['default_value_textarea'])) { - $data['default_value_textarea'] = $helperCatalog->stripTags($data['default_value_textarea']); + $data['default_value_textarea'] = $helperCatalog->escapeHtml($data['default_value_textarea']); } } return $data; @@ -200,7 +200,7 @@ public function saveAction() //validate attribute_code if (isset($data['attribute_code'])) { - $validatorAttrCode = new Zend_Validate_Regex(array('pattern' => '/^[a-z_0-9]{1,255}$/')); + $validatorAttrCode = new Zend_Validate_Regex(array('pattern' => '/^[a-z][a-z_0-9]{1,254}$/')); if (!$validatorAttrCode->isValid($data['attribute_code'])) { $session->addError( $helper->__('Attribute code is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')); @@ -278,7 +278,6 @@ public function saveAction() //filter $data = $this->_filterPostData($data); - $model->addData($data); if (!$id) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php index 9decba622a..1b07be9157 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php @@ -292,14 +292,17 @@ protected function _importRates() 1 => Mage::helper('tax')->__('Country'), 2 => Mage::helper('tax')->__('State'), 3 => Mage::helper('tax')->__('Zip/Post Code'), - 4 => Mage::helper('tax')->__('Rate') + 4 => Mage::helper('tax')->__('Rate'), + 5 => Mage::helper('tax')->__('Zip/Post is Range'), + 6 => Mage::helper('tax')->__('Range From'), + 7 => Mage::helper('tax')->__('Range To') ); $stores = array(); $unset = array(); $storeCollection = Mage::getModel('core/store')->getCollection()->setLoadDefault(false); - for ($i = 5; $i < count($csvData[0]); $i++) { + for ($i = count($csvFields); $i < count($csvData[0]); $i++) { $header = $csvData[0][$i]; $found = false; foreach ($storeCollection as $store) { @@ -369,6 +372,9 @@ protected function _importRates() 'tax_region_id' => ($regions[$v[1]][$v[2]] == '*') ? 0 : $regions[$v[1]][$v[2]], 'tax_postcode' => (empty($v[3]) || $v[3]=='*') ? null : $v[3], 'rate' => $v[4], + 'zip_is_range' => $v[5], + 'zip_from' => $v[6], + 'zip_to' => $v[7] ); $rateModel = Mage::getModel('tax/calculation_rate')->loadByCode($rateData['code']); @@ -407,9 +413,13 @@ public function exportPostAction() 'country_name' => Mage::helper('tax')->__('Country'), 'region_name' => Mage::helper('tax')->__('State'), 'tax_postcode' => Mage::helper('tax')->__('Zip/Post Code'), - 'rate' => Mage::helper('tax')->__('Rate') + 'rate' => Mage::helper('tax')->__('Rate'), + 'zip_is_range' => Mage::helper('tax')->__('Zip/Post is Range'), + 'zip_from' => Mage::helper('tax')->__('Range From'), + 'zip_to' => Mage::helper('tax')->__('Range To') )); - $template = '"{{code}}","{{country_name}}","{{region_name}}","{{tax_postcode}}","{{rate}}"'; + $template = '"{{code}}","{{country_name}}","{{region_name}}","{{tax_postcode}}","{{rate}}"' + . ',"{{zip_is_range}}","{{zip_from}}","{{zip_to}}"'; $content = $headers->toString($template); $storeTaxTitleTemplate = array(); diff --git a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php index 91a14ad616..d379edd75a 100644 --- a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php +++ b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php @@ -38,6 +38,7 @@ abstract class Mage_Api_Model_Server_Handler_Abstract public function __construct() { set_error_handler(array($this, 'handlePhpError'), E_ALL); + Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_ADMINHTML, Mage_Core_Model_App_Area::PART_EVENTS); } public function handlePhpError($errorCode, $errorMessage, $errorFile) diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php index 47f581f2b9..710a939bc7 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php @@ -113,7 +113,7 @@ function changeTaxClassId() { } $mapEnabled = $this->getForm()->getElement('msrp_enabled'); - if ($mapEnabled) { + if ($mapEnabled && $this->getCanEditPrice() !== false) { $mapEnabled->setAfterElementHtml( ' + diff --git a/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml b/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml index 48a1ecc843..7c4ee95464 100644 --- a/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml +++ b/app/design/adminhtml/default/default/template/importexport/import/form/before.phtml @@ -64,6 +64,8 @@ if (newActionUrl) { formElem.action = newActionUrl; } + formElem.action += (formElem.action.lastIndexOf('?') != -1 ? '&' : '?') + + 'form_key=' + encodeURIComponent(formElem.form_key.value); this._submit(); formElem.target = oldTarget; formElem.action = oldAction; diff --git a/app/design/adminhtml/default/default/template/page/header.phtml b/app/design/adminhtml/default/default/template/page/header.phtml index 6ae3c48f54..1c43c2cf6b 100644 --- a/app/design/adminhtml/default/default/template/page/header.phtml +++ b/app/design/adminhtml/default/default/template/page/header.phtml @@ -27,7 +27,7 @@ /** @var $this Mage_Adminhtml_Block_Page_Header */ ?>
- +

__("Logged in as %s", $this->escapeHtml($this->getUser()->getUsername())) ?>|formatDate(null, 'full') ?>|__('Try Magento Go for Free') ?>|__('Log Out') ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml b/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml index f1988fbf22..f3ff535620 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml @@ -213,10 +213,12 @@

+ canApplyCustomPrice($_item)): ?>
checked="checked" onclick="order.toggleCustomPrice(this, 'item_custom_price_getId() ?>', 'item_tier_block_getId() ?>');"/>
+ getOriginalEditablePrice($_item))?>" style="display:none" disabled="disabled" class="input-text item-price"/> diff --git a/app/design/adminhtml/default/default/template/sales/order/creditmemo/create/items/renderer/default.phtml b/app/design/adminhtml/default/default/template/sales/order/creditmemo/create/items/renderer/default.phtml index b7268aa21c..38e35b77a9 100644 --- a/app/design/adminhtml/default/default/template/sales/order/creditmemo/create/items/renderer/default.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/creditmemo/create/items/renderer/default.phtml @@ -239,8 +239,8 @@ displayPriceAttribute('discount_amount') ?> displayPrices( - $_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(), - $_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedRowAmount() + $_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(), + $_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount() ) ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/creditmemo/view/items/renderer/default.phtml b/app/design/adminhtml/default/default/template/sales/order/creditmemo/view/items/renderer/default.phtml index e999501b77..a542321262 100644 --- a/app/design/adminhtml/default/default/template/sales/order/creditmemo/view/items/renderer/default.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/creditmemo/view/items/renderer/default.phtml @@ -227,8 +227,8 @@ displayPriceAttribute('discount_amount') ?> displayPrices( - $_item->getBaseRowTotal()-$_item->getBaseDiscountAmount()+$_item->getBaseTaxAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(), - $_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount() + $_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(), + $_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount() ) ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/invoice/create/items/renderer/default.phtml b/app/design/adminhtml/default/default/template/sales/order/invoice/create/items/renderer/default.phtml index 02efc091cc..0d150dba71 100644 --- a/app/design/adminhtml/default/default/template/sales/order/invoice/create/items/renderer/default.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/invoice/create/items/renderer/default.phtml @@ -233,8 +233,8 @@ displayPriceAttribute('discount_amount') ?> displayPrices( - $_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(), - $_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedRowAmount() + $_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(), + $_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount() ) ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/invoice/view/items/renderer/default.phtml b/app/design/adminhtml/default/default/template/sales/order/invoice/view/items/renderer/default.phtml index d140e7b01b..57e9087b55 100644 --- a/app/design/adminhtml/default/default/template/sales/order/invoice/view/items/renderer/default.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/invoice/view/items/renderer/default.phtml @@ -227,8 +227,8 @@ displayPriceAttribute('discount_amount') ?> displayPrices( - $_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(), - $_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedRowAmount() + $_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(), + $_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount() ) ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/grid.phtml b/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/grid.phtml index 6be8ee87c5..4781cad987 100644 --- a/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/grid.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/grid.phtml @@ -28,26 +28,18 @@
- - - - - - - - - - - - + + @@ -67,8 +59,17 @@ - - + @@ -69,7 +69,7 @@ displayCustomsValue()): ?> - + @@ -82,8 +82,17 @@ -- - - + getContentType() != null): ?> + + getContentType() == 'OTHER'): ?> + + + + + + + + displayCustomsValue()): ?> @@ -107,7 +116,7 @@ getSize()): ?> - + @@ -131,14 +140,21 @@
__('Product Name') ?> __('Weight') ?>displayCustomsValue() ? '' : 'style="display: none;"' ?>> + displayCustomsValue() ? '' : 'style="display: none;"' ?> width="100"> __('Customs Value') ?> + __('Qty Ordered') ?>__('Qty') ?>__('Qty Ordered') ?>__('Qty') ?>
getWeight(); ?> displayCustomsValue() ? '' : 'style="display: none;"' ?> > - + displayCustomsValue()) { + $customsValueDisplay = ''; + $customsValueValidation = ' validate-zero-or-greater '; + } else { + $customsValueDisplay = ' style="display: none;" '; + $customsValueValidation = ''; + } + ?> + > + @@ -78,7 +79,7 @@ -   +   diff --git a/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/packed.phtml b/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/packed.phtml index b662bdc029..1f94a6efcc 100644 --- a/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/packed.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/packed.phtml @@ -43,7 +43,7 @@
__('Customs Value') ?>getCustomsValue() ?>displayPrice($params->getCustomsValue()) ?> __('Total Weight') ?> getWeight() .' '. Mage::helper('usa')->getMeasureWeightName($params->getWeightUnits()) ?>   __('Contents') ?>getContentTypeOther() ?>getContentTypeByCode($params->getContentType()) ?>  
__('Size') ?>getSize() ?>getSize())) ?>    
- - + displayCustomsValue()): ?> + + + + + displayCustomsValue()): ?> + + + @@ -153,6 +169,12 @@ + displayCustomsValue()): ?> + + + diff --git a/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/popup.phtml b/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/popup.phtml index 4eeff26825..0e064fb260 100644 --- a/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/popup.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/shipment/packaging/popup.phtml @@ -110,7 +110,7 @@ document.observe("dom:loaded", function() { displayCustomsValue()) { $customsValueDisplay = ''; - $customsValueValidation = ' required-entry validate-greater-than-zero '; + $customsValueValidation = ' validate-zero-or-greater '; } else { $customsValueDisplay = ' style="display: none;" '; $customsValueValidation = ''; @@ -118,6 +118,7 @@ document.observe("dom:loaded", function() { ?>
__('Product') ?> __('Weight') ?>__('Customs Value') ?>__('Qty Ordered') ?> __('Qty') ?>
getWeight(); ?> displayPrice($item->getCustomsValue()) ?> + getQtyOrderedItem($item->getOrderItemId()); ?> + getQty()*1; ?> > + [getCustomValueCurrencyCode(); ?>] @@ -186,7 +187,7 @@ document.observe("dom:loaded", function() { - +
diff --git a/app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml b/app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml index b8714225a0..56391f1a4a 100644 --- a/app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml @@ -239,8 +239,8 @@ displayPriceAttribute('discount_amount') ?> displayPrices( - $_item->getBaseRowTotal() - $_item->getBaseDiscountAmount() + $_item->getBaseTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount(), - $_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() + $_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(), + $_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount() ); ?> diff --git a/app/design/adminhtml/default/default/template/widget/instance/js.phtml b/app/design/adminhtml/default/default/template/widget/instance/js.phtml index c3b4091c9e..7f0d09e733 100644 --- a/app/design/adminhtml/default/default/template/widget/instance/js.phtml +++ b/app/design/adminhtml/default/default/template/widget/instance/js.phtml @@ -30,8 +30,16 @@ function setSettings(urlTemplate, typeElement, packageThemeElement) { templateSyntax = /(^|.|\r|\n)({{(\w+)}})/; var template = new Template(urlTemplate, templateSyntax); typeElement = $F(typeElement).replace(/\//g, "-"); - packageThemeElement = $F(packageThemeElement).replace(/\//g, "_"); - setLocation(template.evaluate({type:typeElement,package_theme:packageThemeElement})); + packageThemeElement = $F(packageThemeElement); + slashPosition = packageThemeElement.indexOf('/'); + if (slashPosition !== -1) { + mPackage = packageThemeElement.slice(0, slashPosition).replace(/\//g, "_"); + mTheme = packageThemeElement.slice(slashPosition+1, packageThemeElement.length).replace(/\//g, "_"); + } else { + mPackage = '' + mTheme = '' + } + setLocation(template.evaluate({type:typeElement,mpackage:mPackage,mtheme:mTheme})); } function saveAndContinueEdit(){ editForm.submit($('edit_form').action+'back/edit/'); diff --git a/app/design/frontend/base/default/layout/catalog_msrp.xml b/app/design/frontend/base/default/layout/catalog_msrp.xml index 1d399b0d38..bae705460e 100644 --- a/app/design/frontend/base/default/layout/catalog_msrp.xml +++ b/app/design/frontend/base/default/layout/catalog_msrp.xml @@ -46,13 +46,19 @@ Default layout, loads most of the pages + + + + + + - + - + @@ -67,7 +73,7 @@ Default layout, loads most of the pages - + skin_jsjs/msrp.js @@ -84,10 +90,16 @@ Default layout, loads most of the pages msrpcatalog/product_price + + + msrpcatalog/product_price + + msrpcatalog/product_price msrp_itemcatalog/product_price + msrp_noformcatalog/product_price diff --git a/app/design/frontend/base/default/layout/paypal.xml b/app/design/frontend/base/default/layout/paypal.xml index 10483592fd..7308752b4c 100644 --- a/app/design/frontend/base/default/layout/paypal.xml +++ b/app/design/frontend/base/default/layout/paypal.xml @@ -39,6 +39,8 @@ 1 + + @@ -95,14 +97,7 @@ Available logo types can be assigned with action="setLogoType": - - - - 1 - after - - - + @@ -111,98 +106,46 @@ Available logo types can be assigned with action="setLogoType": - - - - 1 - after - - - + - - - - 1 - after - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - - - - + + + + + + + + @@ -234,4 +177,15 @@ Available logo types can be assigned with action="setLogoType": + + + + + + 1 + after + + + + diff --git a/app/design/frontend/base/default/layout/paypaluk.xml b/app/design/frontend/base/default/layout/paypaluk.xml index b93745c141..66e9b8686d 100644 --- a/app/design/frontend/base/default/layout/paypaluk.xml +++ b/app/design/frontend/base/default/layout/paypaluk.xml @@ -38,6 +38,8 @@ 1 + + @@ -85,14 +87,7 @@ - - - - 1 - after - - - + @@ -105,89 +100,48 @@ - - - - 1 - after - - - + - - - - 1 - after - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - - - - + - - - - - 1 - after - + + + + + + + + + + + + + + + 1 + after - + - + diff --git a/app/design/frontend/base/default/layout/reports.xml b/app/design/frontend/base/default/layout/reports.xml index 4e1db69dce..e389898e32 100644 --- a/app/design/frontend/base/default/layout/reports.xml +++ b/app/design/frontend/base/default/layout/reports.xml @@ -34,7 +34,7 @@ - + diff --git a/app/design/frontend/base/default/template/catalog/product/compare/list.phtml b/app/design/frontend/base/default/template/catalog/product/compare/list.phtml index 8a682886af..493d24872b 100644 --- a/app/design/frontend/base/default/template/catalog/product/compare/list.phtml +++ b/app/design/frontend/base/default/template/catalog/product/compare/list.phtml @@ -98,7 +98,7 @@ echo substr($this->getProductAttributeValue($_item, $_attribute),0,10); break; default: ?> - helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getCode()) ?> + helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?> diff --git a/app/design/frontend/base/default/template/catalog/product/price_msrp_noform.phtml b/app/design/frontend/base/default/template/catalog/product/price_msrp_noform.phtml new file mode 100644 index 0000000000..5e9de19e04 --- /dev/null +++ b/app/design/frontend/base/default/template/catalog/product/price_msrp_noform.phtml @@ -0,0 +1,73 @@ + + + +getProduct(); + $_msrpPrice = ""; +?> +
+ helper('tax')->getPrice($_product, $_product->getMsrp()) ?> + getMsrp()): ?> + helper('core')->currency($_product->getMsrp(),true,true) ?> + + + getId() . $this->helper('core')->getRandomString(20); ?> + __('Click for price') ?> + +
diff --git a/app/design/frontend/base/default/template/customer/widget/name.phtml b/app/design/frontend/base/default/template/customer/widget/name.phtml index b9306de2a3..73bedb9074 100644 --- a/app/design/frontend/base/default/template/customer/widget/name.phtml +++ b/app/design/frontend/base/default/template/customer/widget/name.phtml @@ -49,12 +49,12 @@ For checkout/onepage/shipping.phtml:
showPrefix()): ?>
- +
getPrefixOptions()===false): ?> - getFieldParams() ?> /> + getFieldParams() ?> /> - isPrefixRequired()):?> class="required-entry" getFieldParams() ?>> getPrefixOptions() as $_option): ?> @@ -64,33 +64,33 @@ For checkout/onepage/shipping.phtml:
- +
- getFieldParams() ?> /> + getFieldParams() ?> />
showMiddlename()): ?>
- +
- getFieldParams() ?> /> + getFieldParams() ?> />
- +
- getFieldParams() ?> /> + getFieldParams() ?> />
showSuffix()): ?>
- +
getSuffixOptions()===false): ?> - getFieldParams() ?> /> + getFieldParams() ?> /> - isSuffixRequired()):?> class="required-entry" getFieldParams() ?>> getSuffixOptions() as $_option): ?> diff --git a/app/design/frontend/base/default/template/paypal/express/shortcut.phtml b/app/design/frontend/base/default/template/paypal/express/shortcut.phtml index f6e689ef1b..61805e1b3b 100644 --- a/app/design/frontend/base/default/template/paypal/express/shortcut.phtml +++ b/app/design/frontend/base/default/template/paypal/express/shortcut.phtml @@ -34,7 +34,7 @@ isOrPositionBefore()): ?> __('-OR-');?> -<?php echo Mage::helper('paypal')->__('Checkout with PayPal');?> +<?php echo Mage::helper('paypal')->__('Checkout with PayPal');?> isOrPositionAfter()): ?> __('-OR-');?> diff --git a/app/design/frontend/base/default/template/paypal/partner/logo.phtml b/app/design/frontend/base/default/template/paypal/partner/logo.phtml index 47aac225f6..e45b3c6e76 100644 --- a/app/design/frontend/base/default/template/paypal/partner/logo.phtml +++ b/app/design/frontend/base/default/template/paypal/partner/logo.phtml @@ -30,5 +30,5 @@ */ ?> diff --git a/app/design/frontend/base/default/template/persistent/checkout/onepage/login.phtml b/app/design/frontend/base/default/template/persistent/checkout/onepage/login.phtml index ff54260a09..f377571c7c 100644 --- a/app/design/frontend/base/default/template/persistent/checkout/onepage/login.phtml +++ b/app/design/frontend/base/default/template/persistent/checkout/onepage/login.phtml @@ -89,6 +89,7 @@ getChildHtml('persistent.remember.me'); ?> +
@@ -97,7 +98,13 @@

 

- + getQuote()->isAllowedGuestCheckout()): ?> + + +
+ +
+
@@ -127,3 +134,18 @@ } //]]> +getRequest()->getParam('register'); + if ($registerParam || $registerParam === ''): +?> + + diff --git a/app/design/frontend/base/default/template/persistent/customer/form/login.phtml b/app/design/frontend/base/default/template/persistent/customer/form/login.phtml index d6a6b9cd2c..3786a889fa 100644 --- a/app/design/frontend/base/default/template/persistent/customer/form/login.phtml +++ b/app/design/frontend/base/default/template/persistent/customer/form/login.phtml @@ -72,7 +72,7 @@
- +
@@ -82,6 +82,9 @@
+ isContextCheckout()): ?> + + + + + getMsrpPriceMessage($_product) ?> + + + + getRandomString(20); ?> + __("What's this?"); ?> + +
diff --git a/app/design/frontend/default/iphone/template/persistent/customer/form/login.phtml b/app/design/frontend/default/iphone/template/persistent/customer/form/login.phtml index 1dee1ac0c7..ebbf0d8161 100644 --- a/app/design/frontend/default/iphone/template/persistent/customer/form/login.phtml +++ b/app/design/frontend/default/iphone/template/persistent/customer/form/login.phtml @@ -54,10 +54,13 @@
+ isContextCheckout()): ?> + +

__('New Customers') ?>

- +
diff --git a/app/design/frontend/default/modern/layout/wishlist.xml b/app/design/frontend/default/modern/layout/wishlist.xml index da75946406..35de36af7b 100644 --- a/app/design/frontend/default/modern/layout/wishlist.xml +++ b/app/design/frontend/default/modern/layout/wishlist.xml @@ -95,7 +95,7 @@ Wishlist pages wishlist_customer_sidebar - + diff --git a/app/etc/config.xml b/app/etc/config.xml old mode 100644 new mode 100755 diff --git a/app/etc/local.xml.additional b/app/etc/local.xml.additional old mode 100644 new mode 100755 diff --git a/app/etc/local.xml.template b/app/etc/local.xml.template old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_All.xml b/app/etc/modules/Mage_All.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Api.xml b/app/etc/modules/Mage_Api.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Bundle.xml b/app/etc/modules/Mage_Bundle.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Centinel.xml b/app/etc/modules/Mage_Centinel.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Compiler.xml b/app/etc/modules/Mage_Compiler.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Connect.xml b/app/etc/modules/Mage_Connect.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Downloadable.xml b/app/etc/modules/Mage_Downloadable.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_PageCache.xml b/app/etc/modules/Mage_PageCache.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Persistent.xml b/app/etc/modules/Mage_Persistent.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Weee.xml b/app/etc/modules/Mage_Weee.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_Widget.xml b/app/etc/modules/Mage_Widget.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Mage_XmlConnect.xml b/app/etc/modules/Mage_XmlConnect.xml old mode 100644 new mode 100755 diff --git a/app/etc/modules/Phoenix_Moneybookers.xml b/app/etc/modules/Phoenix_Moneybookers.xml old mode 100644 new mode 100755 diff --git a/app/locale/en_US/Mage_Adminhtml.csv b/app/locale/en_US/Mage_Adminhtml.csv index da93ca4626..ad76d99b10 100644 --- a/app/locale/en_US/Mage_Adminhtml.csv +++ b/app/locale/en_US/Mage_Adminhtml.csv @@ -1208,7 +1208,6 @@ "example: ""sitemap/"" or ""/"" for base path (path must be writeable)","example: ""sitemap/"" or ""/"" for base path (path must be writeable)" "example: sitemap.xml","example: sitemap.xml" "from","from" -"images/logo.gif","images/logo.gif" "items selected","items selected" "major","major" "minor","minor" diff --git a/app/locale/en_US/Mage_Api.csv b/app/locale/en_US/Mage_Api.csv index e144ee97fa..915a90c326 100644 --- a/app/locale/en_US/Mage_Api.csv +++ b/app/locale/en_US/Mage_Api.csv @@ -412,7 +412,6 @@ "Your server PHP settings allow you to upload files not more than %s at a time. Please modify post_max_size (currently is %s) and upload_max_filesize (currently is %s) values in php.ini if you want to upload larger files.","Your server PHP settings allow you to upload files not more than %s at a time. Please modify post_max_size (currently is %s) and upload_max_filesize (currently is %s) values in php.ini if you want to upload larger files." "Zip/Postal Code:","Zip/Postal Code:" "critical","critical" -"images/logo.gif","images/logo.gif" "items selected","items selected" "major","major" "minor","minor" diff --git a/app/locale/en_US/Mage_Cms.csv b/app/locale/en_US/Mage_Cms.csv index 209fe6c36c..3920b54d59 100644 --- a/app/locale/en_US/Mage_Cms.csv +++ b/app/locale/en_US/Mage_Cms.csv @@ -112,6 +112,7 @@ "The page URL key contains capital letters or disallowed symbols.","The page URL key contains capital letters or disallowed symbols." "The page has been deleted.","The page has been deleted." "The page has been saved.","The page has been saved." +"The static block content cannot contain directive with its self.","The static block content cannot contain directive with its self." "This block no longer exists.","This block no longer exists." "This page no longer exists.","This page no longer exists." "Title","Title" diff --git a/app/locale/en_US/Mage_Customer.csv b/app/locale/en_US/Mage_Customer.csv index 46801ff39c..2e5586969b 100644 --- a/app/locale/en_US/Mage_Customer.csv +++ b/app/locale/en_US/Mage_Customer.csv @@ -187,7 +187,6 @@ "Login Options","Login Options" "Login and password are required.","Login and password are required." "Login or Create an Account","Login or Create an Account" -"M.I.","M.I." "MM","MM" "Manage Addresses","Manage Addresses" "Manage Customers","Manage Customers" @@ -255,7 +254,6 @@ "Please select","Please select" "Please select region, state or province","Please select region, state or province" "Please, check your email for confirmation key.","Please, check your email for confirmation key." -"Prefix","Prefix" "Prefix Dropdown Options","Prefix Dropdown Options" "Price","Price" "Product","Product" @@ -328,7 +326,6 @@ "Submit","Submit" "Subscribe to Newsletter","Subscribe to Newsletter" "Subscribed to Newsletter?","Subscribed to Newsletter?" -"Suffix","Suffix" "Suffix Dropdown Options","Suffix Dropdown Options" "Tag Name","Tag Name" "Tax Class","Tax Class" diff --git a/app/locale/en_US/Mage_Sales.csv b/app/locale/en_US/Mage_Sales.csv index 62e1445156..1e2aa10225 100644 --- a/app/locale/en_US/Mage_Sales.csv +++ b/app/locale/en_US/Mage_Sales.csv @@ -727,12 +727,12 @@ "The profile has been updated.","The profile has been updated." "The profile has no changes.","The profile has no changes." "The profile state has been updated.","The profile state has been updated." -"The quantity you want to add exceeds the total shipped quantity for","The quantity you want to add exceeds the total shipped quantity for" +"The quantity you want to add exceeds the total shipped quantity for some of selected Product(s)","The quantity you want to add exceeds the total shipped quantity for some of selected Product(s)" "The requested Payment Method is not available.","The requested Payment Method is not available." "The shipping label has been created.","The shipping label has been created." "The transaction ""%s"" (%s) is already closed.","The transaction ""%s"" (%s) is already closed." "The transaction ""%s"" cannot be captured yet.","The transaction ""%s"" cannot be captured yet." -"The value that you entered is not valid. Please use numeric value.","The value that you entered is not valid. Please use numeric value." +"The value that you entered is not valid.","The value that you entered is not valid." "There are no billing agreements yet.","There are no billing agreements yet." "There are no printable documents related to selected orders.","There are no printable documents related to selected orders." "There are no shipping labels related to selected %s.","There are no shipping labels related to selected %s." diff --git a/app/locale/en_US/Mage_Tag.csv b/app/locale/en_US/Mage_Tag.csv index a4987963cd..3d2bb89ee9 100644 --- a/app/locale/en_US/Mage_Tag.csv +++ b/app/locale/en_US/Mage_Tag.csv @@ -1,5 +1,4 @@ "# of Uses","# of Uses" -"%s tag(s) have been accepted for moderation.","%s tag(s) have been accepted for moderation." "Tag Name: %s","Tag Name: %s" "Action","Action" "Add New Tag","Add New Tag" diff --git a/app/locale/en_US/Mage_Usa.csv b/app/locale/en_US/Mage_Usa.csv index 86ceb67688..d3f46d78d7 100644 --- a/app/locale/en_US/Mage_Usa.csv +++ b/app/locale/en_US/Mage_Usa.csv @@ -153,6 +153,7 @@ "Return","Return" "Round","Round" "Sample","Sample" +"Sandbox Mode","Sandbox Mode" "Second Day Service","Second Day Service" "Secure Gateway URL","Secure Gateway URL" "Sender","Sender" diff --git a/app/locale/en_US/Mage_Wishlist.csv b/app/locale/en_US/Mage_Wishlist.csv index ce5045e5a4..24aa16a8a0 100644 --- a/app/locale/en_US/Mage_Wishlist.csv +++ b/app/locale/en_US/Mage_Wishlist.csv @@ -80,6 +80,7 @@ "User description","User description" "View Details","View Details" "View Product","View Product" +"What's this?","What's this?" "Wishlist","Wishlist" "Wishlist Section","Wishlist Section" "Wishlist Sharing","Wishlist Sharing" diff --git a/app/locale/en_US/template/email/password_new.html b/app/locale/en_US/template/email/password_new.html index 69f8589e80..c51dbb4325 100644 --- a/app/locale/en_US/template/email/password_new.html +++ b/app/locale/en_US/template/email/password_new.html @@ -25,7 +25,7 @@ -

Dear {{htmlescape var=$customer.name}},

+

Dear {{htmlescape var=$customer.name}},

Your new password is: {{htmlescape var=$customer.password}}

You can change your password at any time by logging into your account.

diff --git a/downloader/Maged/Controller.php b/downloader/Maged/Controller.php index 6bd61c7ec9..11d6f0ec9d 100755 --- a/downloader/Maged/Controller.php +++ b/downloader/Maged/Controller.php @@ -89,9 +89,9 @@ final class Maged_Controller private $_view; /** - * Config instance + * Connect config instance * - * @var Maged_Model_Config + * @var Mage_Connect_Config */ private $_config; @@ -441,6 +441,11 @@ public function settingsPostAction() { if ($_POST) { $ftp = $this->getFtpPost($_POST); + + /* clear startup messages */ + $this->config(); + $this->session()->getMessages(); + $errors = $this->model('connect', true)->validateConfigPost($_POST); if ($errors) { foreach ($errors as $err) { @@ -450,7 +455,7 @@ public function settingsPostAction() return; } try { - if('ftp' == $_POST['deployment_type'] && !empty($_POST['ftp_host'])) { + if ('ftp' == $_POST['deployment_type'] && !empty($_POST['ftp_host'])) { $this->model('connect', true)->connect()->setRemoteConfig($ftp); } else { $this->model('connect', true)->connect()->setRemoteConfig(''); @@ -615,8 +620,13 @@ public function model($model = null, $singleton = false) public function config() { if (!$this->_config) { - //$this->_config = $this->model('config')->load(); $this->_config = $this->model('connect', true)->connect()->getConfig(); + if (!$this->_config->isLoaded()) { + $this->session()->addMessage('error', "Settings has not been loaded. Used default settings"); + if ($this->_config->getError()) { + $this->session()->addMessage('error', $this->_config->getError()); + } + } } return $this->_config; } diff --git a/downloader/Maged/Model/Connect.php b/downloader/Maged/Model/Connect.php index b557e82b68..2e306a25ca 100644 --- a/downloader/Maged/Model/Connect.php +++ b/downloader/Maged/Model/Connect.php @@ -98,7 +98,8 @@ public function installAll($force=false, $chanName='') */ public function prepareToInstall($id) { - if (!preg_match('#^([^ ]+)\/([^-]+)(-[^-]+)?$#', $id, $match)) { + $match = array(); + if (!$this->checkExtensionKey($id, $match)) { echo('Invalid package identifier provided: '.$id); exit; } @@ -111,7 +112,7 @@ public function prepareToInstall($id) $sconfig = $connect->getSingleConfig(); $options = array(); - $params = array($channel, $package, $version); + $params = array($channel, $package, $version, $version); $this->controller()->channelConfig()->setCommandOptions($this->controller()->session(), $options); $connect->run('package-prepare', $options, $params); @@ -324,9 +325,7 @@ public function installUploadedPackage($file) public function installPackage($id, $force=false) { $match = array(); - //if (!preg_match('#^([^ ]+) ([^-]+)(-[^-]+)?$#', $id, $match)) {// there is bug? space not used as separator "/" must be there. Version number part (-[^-]+) may be optional? - //if (!preg_match('#^([^\/]+)\/([^-]+)?$#', $id, $match)&&!preg_match('#^([^ ]+)\/([^-]+)(-[^-]+)?$#', $id, $match)&&!preg_match('#^([^ ]+) ([^-]+)(-[^-]+)?$#', $id, $match)) { - if (!preg_match('#^([^ ]+)\/([^-]+)(-[^-]+)?$#', $id, $match)) { + if (!$this->checkExtensionKey($id, $match)) { $this->connect()->runHtmlConsole('Invalid package identifier provided: '.$id); exit; } @@ -470,8 +469,23 @@ public function saveConfigPost($p) $configObj->global_dir_mode = octdec(intval($p['mkdir_mode'])); $configObj->global_file_mode = octdec(intval($p['chmod_file_mode'])); } - $this->controller()->session()->addMessage('success', 'Settings has been successfully saved'); + if ($configObj->save()) { + $this->controller()->session()->addMessage('success', 'Settings has been successfully saved'); + } else { + $this->controller()->session()->addMessage('error', 'Settings cannot be saved'); + } return $this; } + /** + * Check Extension Key + * + * @param string $id + * @param array $match + * @return int + */ + public function checkExtensionKey($id, &$match) + { + return preg_match('#^([^ ]+)\/([^-]+)(-.+)?$#', $id, $match); + } } diff --git a/downloader/lib/Mage/Connect/Command/Install.php b/downloader/lib/Mage/Connect/Command/Install.php index d3974bde0e..56aa3fc1ed 100644 --- a/downloader/lib/Mage/Connect/Command/Install.php +++ b/downloader/lib/Mage/Connect/Command/Install.php @@ -74,7 +74,8 @@ public function doInstall($command, $options, $params, $objects = array()) $config->magento_root=dirname(dirname($_SERVER['SCRIPT_FILENAME'])); } chdir($config->magento_root); - $dirCache = DIRECTORY_SEPARATOR . $config->downloader_path . DIRECTORY_SEPARATOR . Mage_Connect_Config::DEFAULT_CACHE_PATH; + $dirCache = DIRECTORY_SEPARATOR . $config->downloader_path . DIRECTORY_SEPARATOR + . Mage_Connect_Config::DEFAULT_CACHE_PATH; $dirTmp = DIRECTORY_SEPARATOR . Mage_Connect_Package_Reader::PATH_TO_TEMPORARY_DIRECTORY; $dirMedia = DIRECTORY_SEPARATOR . 'media'; $isWritable = true; @@ -103,7 +104,9 @@ public function doInstall($command, $options, $params, $objects = array()) && is_writable($config->magento_root . $dirTmp); if(!$isWritable){ $this->doError($command, $err); - throw new Exception('Your Magento folder does not have sufficient write permissions, which downloader requires.'); + throw new Exception( + 'Your Magento folder does not have sufficient write permissions, which downloader requires.' + ); } if(!empty($channelAuth)){ $rest->getLoader()->setCredentials($channelAuth['username'], $channelAuth['password']); @@ -135,7 +138,8 @@ public function doInstall($command, $options, $params, $objects = array()) if (!($cache->isChannelName($pChan) || $cache->isChannelAlias($pChan))) { - throw new Exception("The '{$pChan}' channel is not installed. Please use the MAGE shell script to install the '{$pChan}' channel."); + throw new Exception("The '{$pChan}' channel is not installed. Please use the MAGE shell " + . "script to install the '{$pChan}' channel."); } $conflicts = $cache->hasConflicts($pChan, $pName, $pVer); @@ -205,19 +209,27 @@ public function doInstall($command, $options, $params, $objects = array()) $channel = $params[0]; $package = $params[1]; $argVersionMax = isset($params[2]) ? $params[2]: false; - $argVersionMin = false; - + $argVersionMin = isset($params[3]) ? $params[3]: false; + $cache->checkChannel($channel, $config, $rest); $channelName = $cache->chanName($channel); $this->ui()->output("Checking dependencies of packages"); - $packagesToInstall = $packager->getDependenciesList( $channelName, $package, $cache, $config, $argVersionMax, $argVersionMin, $withDepsMode, false, $rest); + $packagesToInstall = $packager->getDependenciesList($channelName, $package, $cache, $config, + $argVersionMax, $argVersionMin, $withDepsMode, false, $rest + ); /* - * @TODO: process 'failed' results + * process 'failed' results */ if(count($packagesToInstall['failed'])) { $showError=!count($packagesToInstall['result']); foreach($packagesToInstall['failed'] as $failed){ - //$failed = array('name'=>$package, 'channel'=>$chanName, 'max'=>$versionMax, 'min'=>$versionMin, 'reason'=>$e->getMessage()); + //$failed = array( + // 'name'=>$package, + // 'channel'=>$chanName, + // 'max'=>$versionMax, + // 'min'=>$versionMin, + // 'reason'=>$e->getMessage() + //); $msg="Package {$failed['channel']}/{$failed['name']} failed: ".$failed['reason']; if($showError){ $this->doError($command, $msg); @@ -242,7 +254,9 @@ public function doInstall($command, $options, $params, $objects = array()) foreach($neededToUpgrade as $chan=>$packages) { foreach($packages as $name=>$data) { $versionTo = $data['to']; - $tmp = $packager->getDependenciesList( $chan, $name, $cache, $config, $versionTo, $versionTo, $withDepsMode, false, $rest); + $tmp = $packager->getDependenciesList($chan, $name, $cache, $config, $versionTo, $versionTo, + $withDepsMode, false, $rest + ); if(count($tmp['result'])) { $packagesToInstall = array_merge($packagesToInstall, $tmp['result']); } @@ -268,13 +282,17 @@ public function doInstall($command, $options, $params, $objects = array()) /** * Skip existing packages */ - if ($upgradeMode && $cache->hasPackage($pChan, $pName, $pVer, $pVer) || ('already_installed' == $pInstallState && !$forceMode)) { + if ($upgradeMode && $cache->hasPackage($pChan, $pName, $pVer, $pVer) + || ('already_installed' == $pInstallState && !$forceMode) + ) { $this->ui()->output("Already installed: {$pChan}/{$pName} {$pVer}, skipping"); continue; } if('incompartible' == $pInstallState) { - $this->ui()->output("Package incompartible with installed Magento: {$pChan}/{$pName} {$pVer}, skipping"); + $this->ui()->output( + "Package incompartible with installed Magento: {$pChan}/{$pName} {$pVer}, skipping" + ); continue; } @@ -314,7 +332,8 @@ public function doInstall($command, $options, $params, $objects = array()) if($ftp) { $cwd=$ftpObj->getcwd(); - $dir=$cwd . DIRECTORY_SEPARATOR .$config->downloader_path . DIRECTORY_SEPARATOR . Mage_Connect_Config::DEFAULT_CACHE_PATH . DIRECTORY_SEPARATOR . trim( $pChan, "\\/"); + $dir=$cwd . DIRECTORY_SEPARATOR .$config->downloader_path . DIRECTORY_SEPARATOR + . Mage_Connect_Config::DEFAULT_CACHE_PATH . DIRECTORY_SEPARATOR . trim( $pChan, "\\/"); $ftpObj->mkdirRecursive($dir,0777); $ftpObj->chdir($cwd); } else { @@ -371,7 +390,7 @@ public function doInstall($command, $options, $params, $objects = array()) throw new Exception($err); } } - + /** * @todo: make "Use custom permissions" functionality working */ @@ -483,9 +502,14 @@ public function doUninstall($command, $options, $params) $list = $packager->getUninstallList($channel, $package, $cache, $config, $withDepsMode); foreach($list['list'] as $packageData) { try { - $reqd = $cache->requiredByOtherPackages($packageData['channel'], $packageData['name'], $list['list']); + $reqd = $cache->requiredByOtherPackages( + $packageData['channel'], + $packageData['name'], + $list['list'] + ); if(count($reqd)) { - $errMessage = "{$packageData['channel']}/{$packageData['name']} {$packageData['version']} is required by: "; + $errMessage = "{$packageData['channel']}/{$packageData['name']} " + . "{$packageData['version']} is required by: "; $t = array(); foreach($reqd as $r) { $t[] = $r['channel']."/".$r['name']. " ".$r['version']; diff --git a/downloader/lib/Mage/Connect/Config.php b/downloader/lib/Mage/Connect/Config.php index 2df0dbb299..22136a2d80 100644 --- a/downloader/lib/Mage/Connect/Config.php +++ b/downloader/lib/Mage/Connect/Config.php @@ -23,11 +23,36 @@ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Connect_Config -implements Iterator +class Mage_Connect_Config implements Iterator { + /** + * Config file name + * + * @var string + */ protected $_configFile; + + /** + * Config loaded from file + * + * @var bool + */ protected $_configLoaded; + + /** + * Save file even if it not modified + * + * @var bool + */ + protected $_forceSave = false; + + /** + * Stores last error message + * + * @var string + */ + protected $_configError = ''; + const HEADER = "::ConnectConfig::v::1.0::"; const DEFAULT_DOWNLOADER_PATH = "downloader"; const DEFAULT_CACHE_PATH = ".cache"; @@ -35,6 +60,17 @@ class Mage_Connect_Config protected $defaultProperties = array(); protected $properties = array(); + /** + * Constructor loads the data from config file + * @param string $configFile + */ + public function __construct($configFile = "connect.cfg") + { + $this->initProperties(); + $this->_configFile = $configFile; + $this->load(); + } + protected function initProperties() { $this->defaultProperties = array ( @@ -142,82 +178,127 @@ public function getChannelCacheDir($channel) return $this->getPackagesCacheDir(). DIRECTORY_SEPARATOR . $channel; } - public function __construct($configFile = "connect.cfg") - { - $this->initProperties(); - $this->_configFile = $configFile; - $this->load(); - } - public function getFilename() { return $this->_configFile; } + /** + * Load data from config file + * + * @return bool + */ public function load() { $this->_configLoaded=false; - /** - * Trick: open in append mode to read, - * place pointer to begin - * create if not exists - */ - if(is_file($this->_configFile)){ + if (!is_file($this->_configFile)) { + if (!$this->save()) { + $this->_configError = 'Config file does not exists please save Settings'; + } else { + $this->_configLoaded=true; + return true; + } + return false; + } + + try { $f = fopen($this->_configFile, "r"); fseek($f, 0, SEEK_SET); - $size = filesize($this->_configFile); - if(!$size) { - $this->store(); - return; - } + } catch (Exception $e) { + $this->_configError = "Cannot open config file {$this->_configFile} please check file permission"; + return false; + } - $headerLen = strlen(self::HEADER); - $contents = fread($f, $headerLen); + clearstatcache(); + $size = filesize($this->_configFile); + if(!$size) { + $this->_configError = "Wrong config file size {$this->_configFile} please save Settings again"; + return false; + } + $headerLen = strlen(self::HEADER); + try { + $contents = fread($f, $headerLen); if(self::HEADER != $contents) { - $this->store(); - return; + $this->_configError = "Wrong configuration file {$this->_configFile} please save Settings again"; + return false; } $size -= $headerLen; $contents = fread($f, $size); - - $data = @unserialize($contents); - if($data === unserialize(false)) { - $this->store(); - return; - } - foreach($data as $k=>$v) { - $this->$k = $v; - } - fclose($f); + } catch (Exception $e) { + $this->_configError = "Configuration file {$this->_configFile} read error '{$e->getMessage()}'" + . " please save Settings again"; + return false; + } + $data = @unserialize($contents); + if($data === false) { + $this->_configError = "Wrong configuration file {$this->_configFile} please save Settings again"; + return false; } + foreach($data as $k=>$v) { + $this->$k = $v; + } + @fclose($f); $this->_configLoaded=true; } + /** + * Save config file on the disk or over ftp + * + * @return bool + */ public function store() { - if($this->_configLoaded||strlen($this->remote_config)>0){ - // @TODO: use ftp to save config + $result = false; + if ($this->_forceSave || $this->_configLoaded || strlen($this->remote_config)>0) { $data = serialize($this->toArray()); - if(strlen($this->remote_config)>0){ - $confFile=$this->downloader_path.DIRECTORY_SEPARATOR."connect.cfg"; - $ftpObj = new Mage_Connect_Ftp(); - $ftpObj->connect($this->remote_config); - $tempFile = tempnam(sys_get_temp_dir(),'config'); - $f = @fopen($tempFile, "w+"); - @fwrite($f, self::HEADER); - @fwrite($f, $data); - @fclose($f); - $ret=$ftpObj->upload($confFile, $tempFile); - $ftpObj->close(); - }elseif(is_file($this->_configFile)&&is_writable($this->_configFile)||is_writable(getcwd())) { - $f = @fopen($this->_configFile, "w+"); - @fwrite($f, self::HEADER); - @fwrite($f, $data); - @fclose($f); + if (strlen($this->remote_config)>0) { + //save config over ftp + $confFile = $this->downloader_path . DIRECTORY_SEPARATOR . "connect.cfg"; + try { + $ftpObj = new Mage_Connect_Ftp(); + $ftpObj->connect($this->remote_config); + } catch (Exception $e) { + $this->_configError = 'Cannot access to deployment FTP path. ' + . 'Check deployment FTP Installation path settings.'; + return $result; + } + try { + $tempFile = tempnam(sys_get_temp_dir(),'config'); + $f = fopen($tempFile, "w+"); + fwrite($f, self::HEADER); + fwrite($f, $data); + fclose($f); + } catch (Exception $e) { + $this->_configError = 'Cannot access to temporary file storage to save Settings.' + . 'Contact your system administrator.'; + return $result; + } + try { + $result = $ftpObj->upload($confFile, $tempFile); + $ftpObj->close(); + } catch (Exception $e) { + $this->_configError = 'Cannot write file over FTP. ' + . 'Check deployment FTP Installation path settings.'; + return $result; + } + if (!$result) { + $this->_configError = ''; + } + } elseif (is_file($this->_configFile) && is_writable($this->_configFile) || is_writable(getcwd())) { + try { + $f = fopen($this->_configFile, "w+"); + fwrite($f, self::HEADER); + fwrite($f, $data); + fclose($f); + $result = true; + } catch (Exception $e) { + $result = false; + } } } + return $result; } public function validate($key, $val) @@ -343,4 +424,41 @@ public function getDefaultValue($key) } return false; } + + /** + * Check is config loaded + * + * @return string + */ + public function isLoaded() + { + return $this->_configLoaded; + } + + /** + * Retrieve error message + * + * @return string + */ + public function getError() + { + return $this->_configError; + } + + /** + * Save config + * + * @return string + */ + public function save() + { + $forceSave = $this->_forceSave; + $this->_forceSave = true; + + $result = $this->store(); + + $this->_forceSave = $forceSave; + + return $result; + } } diff --git a/downloader/lib/Mage/Connect/Ftp.php b/downloader/lib/Mage/Connect/Ftp.php index f7b6b52b49..b7758ffc64 100644 --- a/downloader/lib/Mage/Connect/Ftp.php +++ b/downloader/lib/Mage/Connect/Ftp.php @@ -208,7 +208,7 @@ public function getcwd() if(empty($data[1])) { return false; } - if(intval($data[0]) != 257) { + if(intval($data[0]) != 257) { return false; } $out = trim($data[1], '"'); @@ -240,20 +240,20 @@ public function raw($cmd) * @param string $local * @param int $dirMode * @param int $fileMode - * @return unknown_type + * @return bool */ public function upload($remote, $local, $dirMode = 0777, $fileMode=0) { $this->checkConnected(); if(!file_exists($local)) { - throw new Exception("Local file doesn't exist: {$localFile}"); + throw new Exception("Local file doesn't exist: {$local}"); } if(!is_readable($local)) { - throw new Exception("Local file is not readable: {$localFile}"); + throw new Exception("Local file is not readable: {$local}"); } if(is_dir($local)) { - throw new Exception("Directory given instead of file: {$localFile}"); + throw new Exception("Directory given instead of file: {$local}"); } $globalPathMode = substr($remote, 0, 1) == "/"; @@ -282,7 +282,7 @@ public function upload($remote, $local, $dirMode = 0777, $fileMode=0) if($fileMode){ $res=$this->chmod($fileMode, $remote); } - return $res; + return (bool)$res; } /** @@ -420,7 +420,13 @@ public static function chmodnum($chmod) return array_sum(str_split($array[0])) . array_sum(str_split($array[1])) . array_sum(str_split($array[2])); } - + /** + * Checks file exists + * + * @param string $path + * @param bool $excludeIfIsDir + * @return bool + */ public function fileExists($path, $excludeIfIsDir = true) { $path = $this->correctFilePath($path); @@ -428,18 +434,17 @@ public function fileExists($path, $excludeIfIsDir = true) $file = basename($path); $dir = $globalPathMode ? dirname($path) : $this->getcwd()."/".($path==basename($path)?'':$path); - $data = $this->ls($dir); + $data = $this->ls($dir); foreach($data as $row) { if($file == basename($row['name'])) { if($excludeIfIsDir && $row['dir']) { continue; - } + } return true; } } return false; } - /** * Get directory contents in PHP array @@ -479,8 +484,7 @@ public function ls($dir = "/", $recursive = false) } return $structure; } - - + /** * Correct file path * @param $str @@ -492,7 +496,7 @@ public function correctFilePath($str) $str = preg_replace("/^.\//", "", $str); return $str; } - + /** * Delete file * @param string $file @@ -502,7 +506,7 @@ public function delete($file) { $this->checkConnected(); $file = $this->correctFilePath($file); - return @ftp_delete($this->_conn, $file); + return @ftp_delete($this->_conn, $file); } /** @@ -516,5 +520,4 @@ public function rmdir($dir) $dir = $this->correctFilePath($dir); return @ftp_rmdir($this->_conn, $dir); } - } diff --git a/downloader/lib/Mage/Connect/Packager.php b/downloader/lib/Mage/Connect/Packager.php index c594fea728..2fa9d730fa 100644 --- a/downloader/lib/Mage/Connect/Packager.php +++ b/downloader/lib/Mage/Connect/Packager.php @@ -676,7 +676,20 @@ public function getDependenciesList( $chanName, $package, $cache, $config, $vers throw new Exception("No releases for '{$package}', skipping"); } $state = $config->preferred_state ? $config->preferred_state : 'stable'; - $version = $cache->detectVersionFromRestArray($releases, $versionMin, $versionMax, $state); + /** + * Check current package version first + */ + $installedPackage = $cache->getPackage($chanName, $package); + if ($installedPackage && is_array($installedPackage)) { + $installedRelease = array(array( + 'v' => $installedPackage['version'], + 's' => $installedPackage['stability'], + )); + $version = $cache->detectVersionFromRestArray($installedRelease, $versionMin, $versionMax, $state); + } + if (!$version) { + $version = $cache->detectVersionFromRestArray($releases, $versionMin, $versionMax, $state); + } if (!$version) { $versionState = $cache->detectVersionFromRestArray($releases, $versionMin, $versionMax); if ($versionState) { diff --git a/downloader/lib/Mage/Connect/Singleconfig.php b/downloader/lib/Mage/Connect/Singleconfig.php index ab5d330db5..35b225e4ca 100644 --- a/downloader/lib/Mage/Connect/Singleconfig.php +++ b/downloader/lib/Mage/Connect/Singleconfig.php @@ -96,7 +96,7 @@ public function getFilename() } public function formatUri($uri) - { + { $uri = rtrim($uri, "/"); $uri = str_replace("http://", '', $uri); $uri = str_replace("https://", '', $uri); @@ -247,7 +247,7 @@ public function checkChannel($chanName, $config, $rest = null) } elseif($chanName) { $uri = $config->protocol.'://'.$chanName; } else { - throw new Exception("'{$channel}' is not existant channel name / valid uri"); + throw new Exception("'{$chanName}' is not existant channel name / valid uri"); } if ($uri && !$this->isChannel($uri)) { @@ -429,6 +429,7 @@ protected function unsetPackageRecord($chanName, $packageName) /** * Get package record + * * @param string $chanName * @param string $packageName * @return array @@ -675,7 +676,7 @@ public function hasPackage($chanName, $package, $versionMin = false, $versionMax /** * Check whether package installed or not. Return package if it installed - * + * * @param string $package package name * @return array */ @@ -691,15 +692,22 @@ public function isPackageInstalled($package) return false; } - + /** + * Checks whether the version in in the specified range of versionMin to versionMax + * + * @param string $version + * @param string $versionMin + * @param string $versionMax + * @return bool + */ public function versionInRange($version, $versionMin = false, $versionMax = false) { - if(false === $versionMin) { + if(false === $versionMin || empty($versionMin)) { $minOk = true; } else { $minOk = version_compare($version, $versionMin, ">="); } - if(false === $versionMax) { + if(false === $versionMax || empty($versionMax)) { $maxOk = true; } else { $maxOk = version_compare($version, $versionMax, "<="); @@ -716,9 +724,9 @@ public function hasVersionRangeIntersect($min1, $max1, $min2, $max2) } elseif(version_compare($min1, $min2, ">=") && version_compare($max1, $max2, "<=")) { return true; } elseif(version_compare($min1, $min2, "<=") && version_compare($max1, $max2, ">=")) { - return true; + return true; } - return false; + return false; } /** @@ -756,7 +764,8 @@ public function compareStabilities($s1, $s2) - public function detectVersionFromRestArray($restData, $argVersionMin = false, $argVersionMax = false, $preferredStability = 'devel') + public function detectVersionFromRestArray($restData, $argVersionMin = false, $argVersionMax = false, + $preferredStability = 'devel') { if(!is_array($restData)) { @@ -817,8 +826,6 @@ public function getDependencyInfo($chanName, $package) return false; } - - public function getChannelNames() { return array_keys($this->_data[self::K_CHAN]); @@ -856,16 +863,13 @@ public function requiredByOtherPackages($chanName, $packageName, $excludeList = } $deps = $package[self::K_PACK_DEPS]; if($this->specifiedInDependencyList($deps, $chanName, $packageName)) { - $out[] = array('channel'=>$channel, 'name' =>$package['name'], 'version'=>$package['version']); - } + $out[] = array('channel'=>$channel, 'name' =>$package['name'], 'version'=>$package['version']); + } } } return $out; } - - - public function getInstalledPackages($chanName = false) { if(false == $chanName) { @@ -888,8 +892,6 @@ public function getInstalledPackages($chanName = false) return $out; } - - /** * Check if package conflicts with installed packages * Returns: @@ -907,7 +909,7 @@ public function hasConflicts($chanName, $packageName, $version) foreach($this->_data[self::K_CHAN] as $channel=>$data) { foreach($data[self::K_PACK] as $package) { /** - * @todo When we are building dependencies tree we should base this calculations not on full key as on + * @todo When we are building dependencies tree we should base this calculations not on full key as on * a unique value but check it by parts. First part which should be checked is EXTENSION_NAME also this * part should be unique globally not per channel. */ @@ -929,8 +931,4 @@ public function hasConflicts($chanName, $packageName, $version) } return count($conflicts) ? $conflicts : false; } - - - - } diff --git a/downloader/lib/Mage/Connect/Validator.php b/downloader/lib/Mage/Connect/Validator.php index 10636040e9..6cbd1bae61 100644 --- a/downloader/lib/Mage/Connect/Validator.php +++ b/downloader/lib/Mage/Connect/Validator.php @@ -318,7 +318,7 @@ public function validateEmail($email) */ public function validatePackageName($name) { - return preg_match("/^[a-zA-Z0-9_-]+$/i", $name); + return preg_match("/^[a-zA-Z0-9_]+$/i", $name); } /** diff --git a/downloader/template/connect/packages.phtml b/downloader/template/connect/packages.phtml index 0f0ce2bc24..459feb098a 100644 --- a/downloader/template/connect/packages.phtml +++ b/downloader/template/connect/packages.phtml @@ -41,7 +41,7 @@