magento-1.4

Mage registry key “controller” already exists

╄→гoц情女王★ 提交于 2020-01-24 01:23:09
问题 I have configured an ecommerce site using Magento, but it is throwing an error. Mage registry key "controller" already exists I am not sure what to do. The URL for site is http://musicademy.sweetersinging.com/store/admin 回答1: This usually happens if you try and run Mage::run() twice - or specifically, once more after the index.php bootstrap. Sounds like a (extremely) badly written 3rd party extension or template. It (sadly) wouldn't be the first time I've seen someone execute this within a

Magento - Programmatically added products don't show up

旧时模样 提交于 2020-01-15 03:20:47
问题 I am trying to import products using a custom made import profile. Here I set some values on the product and then save it, like this: $product = Mage::getModel('catalog/product'); $data = array(); // Inbetween I fill $data with some values $product->addData($data); $product->save(); However, the products do show up in the admin, but do not show up on the frontend (I did add them to categories). The odd thing is, they do appear on the frontend once I open them in the admin and save them again

Magento: Shopping cart price rule gets applied, but discount not subtracted from subtotal

為{幸葍}努か 提交于 2020-01-14 14:51:07
问题 I have created a shopping cart price rule in my Magento store (version 1.4.1.1), and it seems to get applied without issue on the frontend, but the discount isn't actually reflected in the subtotal or final total. The original item price is $45.00, and the discount should be $35.00, making the final price $10.00. Here are some screenshots of the setup. (Sorry, because I'm a new user it won't let me post images directly in this posting.) http://imgur.com/a/hdYDb Main rule page Actions page

How to remove item from quote in Magento?

时光怂恿深爱的人放手 提交于 2020-01-13 18:01:29
问题 During the checkout process I sometimes want to programmatically remove items from the session's quote. So I tried this code: $quote = Mage::getSingleton('checkout/session')->getQuote(); $all_quote_items = $quote->getAllItems(); foreach ($all_quote_items as $item) { $quote->removeItem($item->getId())->save(); } However, after this loop the list of items in the $quote object is still the same, i.e. no items have been removed. Any ideas what I am missing here? Using Magento 1.4.1.1 回答1: Try

Magento changes layout dynamically via system variable

假装没事ソ 提交于 2020-01-13 02:23:51
问题 Is there a way we could changes the layout of a Magento page (let's say a product category page) dynamically by using system variable which have been set on our own module? I want to be able to set my category page's default layout via my own module admin config panel. So that I don't have to deal with those confusing XML layout file each time I want to change my default layout for a certain magento page. I know, on a phtml file, we could simply call our own module's system variable by

I want to Modify Custom Option Percent Functionality

霸气de小男生 提交于 2020-01-01 12:16:18
问题 I want to implement such a functionality if we have a custom option with price value 10 and its price type is percent and its base price is 0 how can i implement it. I want Firstly from my first client chooses the Size and price is added according to size when client choose the color from color drop down then the percentage value should be calculated from the first dropdown value select for example if client chooses an option A with price $20 the 20$ is added to its price and i have to

magento orders list query

前提是你 提交于 2019-12-30 01:38:09
问题 I want to select the list of all orders in Magento. This is required for me to show the list of all the orders from magento in another PHP application presently I'm working on. Also can some one write me the code using the Magento conventions such as Mage:: Im using Magento 1.4.2 version. Thanks, Mark 回答1: This code uses the "Magento way" and accesses the data through the Model layer which insulates you from changes in the table structure (e.g. flat vs EAV). Create a new PHP file containing

how to get value from array in array in array?

≡放荡痞女 提交于 2019-12-25 09:38:06
问题 I get this array when I print_r($_POST) , from the below result I want to get the value of skin . [skin] => 1.jpg how will i do that ??? Array ( [form_key] => WceDMPJOQD17ZeSW [config_state] => Array ( [themeoptions_general] => 1 ) [groups] => Array ( [general] => Array ( [fields] => Array ( [themeoptions_images] => Array ( [skin] => 1.jpg ) [themeoptions_customcss] => Array ( [value] => color:#333; ) ) ) ) ) 回答1: $_POST['groups']['general']['fields']['themeoptions_images']['skin'] This will

Magento-Set latest products to Email template

让人想犯罪 __ 提交于 2019-12-25 08:49:35
问题 In my magento site I have to give the functionality to send invitation mail to friends. This Email includes name of person who is sending invitation and latest sales(configure products )images dynamically. The email template I have set under admin->transaction email. Now how can I set both dynamic data for the mail template? 回答1: You can look into one of the templates showing dynamic data in app/locale/en_US/template/email 来源: https://stackoverflow.com/questions/6054166/magento-set-latest

Find the name and email address of non-members who used coupon code in Magento

淺唱寂寞╮ 提交于 2019-12-24 11:11:45
问题 We would like to be able to pull the name and email address of customers who purchased items as a guest. Has anyone had any luck in doing so? I've seen a few posts of how to pull the names of customers who have used the coupon code, but nothing about non-customers! Thank you guys very much for your help! -Jeff 回答1: This should work: $orderCollection = Mage::getModel('sales/order')->getCollection() ->addAttributeToSelect('customer_firstname') ->addAttributeToSelect('customer_lastname') -