magento-1.4

Magento - registry and current category

一世执手 提交于 2019-12-08 09:25:35
问题 I have a question about Mage::registry and categories: I'm a on a category page, I retrieve current category by Mage::registry('current_category') . I've noticed that it works only for root categories, in fact if I visit a subcategory page I retrieve always the root category with Mage::registry('current_category') . So the question is: is something about backend configuration, cache or something else? 回答1: OOB, current_category is set in Mage_Catalog CategoryController::_initCategory() (ref

Magento order import/export [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-07 11:55:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Is there any way to import/export the orders from magento. Since we have magento store on live and another dev. version is ready with greatest change now we only need to import the magento orders alone. Here i can see only export - http://www.magentocommerce.com/magento-connect/slandsbek/extension/1350/simple

Linking to Magento Admin from Outside Admin Panel

冷暖自知 提交于 2019-12-07 05:23:36
问题 I'm trying to build some CRM tools that send emails to my sales guys and link back to pages inside the Magento Admin. I've been building the URLS like this: Mage::getUrl('*/quotes/edit', array('id'=>$quote->getQuoteId(), '_current'=>true)) The problem is it only sends them to the dashboard. I'm assuming it is because the setting for "_current" is changed when they login, thus invalidating the link and sending them to the default page. Any ideas on how I could make a link into the Admin that

I am getting a block twice in Magento?

丶灬走出姿态 提交于 2019-12-07 01:38:37
问题 I am trying to create product block on home page where in I copied page.xml to my theme's layout folder and modified it like <page_two_columns_left translate="label"> <label>All Two-Column Layout Pages (Left Column)</label> <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> <!-- Mark root page block that template is applied --> <action method="setIsHandle"><applied>1</applied></action> </reference> <reference name="content"> <block type

Magento: Setting a custom attribute on the sales/order_shipment model

限于喜欢 提交于 2019-12-06 17:25:40
I'm trying to add an EAV attribute called "vendorping" to the sales/order_shipment model. To accomplish this, I created the following file in my module: // app\code\local\Jb\Vendorping\sql\vendorping_setup\mysql4-install-0.1.0.php $this->startSetup(); $sql = 'SELECT entity_type_id FROM `'.$this->getTable('eav_entity_type').'` WHERE entity_type_code = \'shipment\''; $row = Mage::getSingleton('core/resource') ->getConnection('core_read') ->fetchRow($sql); $entityTypeId = $row['entity_type_id']; $c = array( 'entity_type_id' => $entityTypeId, 'attribute_code' => 'vendorping', 'backend_type' =>

Magento Country Reorder

时光毁灭记忆、已成空白 提交于 2019-12-06 13:44:47
问题 How do i reorder the Country default drop down order in Magento. Like United States should be first in the select option list rather than by alphabetic sorting. I couldn't find either in database or in xml,csv,php files, where these countries list stored. Please help me out of this. 回答1: I've not done this, though I've thought about it. I'm guessing you could override the controller the block that pulls that data from the database. Select boxes are just arrays of values, so perhaps you could

Magento is redirecting to cart when continuing from Billing info

牧云@^-^@ 提交于 2019-12-06 12:46:17
问题 Whenever I add an item to the cart, then checkout, I choose register or checkout as guest. Then I enter the billing information and click continue. It always redirects back to the cart. I have not been able to figure out why. Example is here: http://38.98.53.62 Thanks 来源: https://stackoverflow.com/questions/4844192/magento-is-redirecting-to-cart-when-continuing-from-billing-info

Magento - How can I run code when my order is canceled or refunded

匆匆过客 提交于 2019-12-06 08:39:23
问题 My payment module is required to sent notifications to the payment service if an order is canceled or refunded. I assume that the "Cancel" button on the order page (in the administration backend) will cancel the order, and that the "Credit memo" button (after an invoice has been created) will refund the order. How do I run my code on these events? I tried using the cancel() method in my payment method model, but the code did not run. 回答1: Seems like your payment method is not using

Magento - Load Product Collection with Pagination

好久不见. 提交于 2019-12-06 06:06:32
I've been trying to load a product collection and then filter it by calling in the review ids into array and then applying that filter to it. I've enclosed the code below which is in the top of the List.phtml that I'm running it through a custom copy of the list.phtml like so <block type="catalog/product_list" name="sale" template="reviewsList/index.phtml"> Good news is that the collection will load, but it breaks the pagination. If anyone has any ideas that would be great. Full code below. Any help much appreciated. <?php $reviewCollection = Mage::getModel('review/review')->getCollection()-

Magento: Deduct Tax at Checkout for (most) countries [closed]

扶醉桌前 提交于 2019-12-06 05:45:06
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center . Closed 6 years ago . I am working on a UK fashion store. The customer has a specific requirement - never add tax (VAT) at checkout; rather, have VAT built into the price, and deduct when applicable. The use case is that EU purchases will have no tax added at checkout - as the price includes it. And, rest of the world purchases will