magento-1.7

Filter in grid with custom renderer

♀尐吖头ヾ 提交于 2019-12-03 13:27:17
问题 I have a problem with filter in my module in admin grid. My problem is: Filter for columns with custom renderer not working. public function _prepareColumns() { $this->addColumn('entity_id', array( 'header' => 'ID', 'index' => 'entity_id', 'width' => '30px' )); $this->addColumn('author', array( 'header' => 'Author', 'index' => 'author', 'renderer' => 'Test_Block_Adminhtml_Vj_Renderer_Author' )); renderer is class Test_Block_Adminhtml_Vj_Renderer_Author extends Mage_Adminhtml_Block_Widget_Grid

importing configurable products in Magento from CSV

两盒软妹~` 提交于 2019-12-03 13:13:21
I'm trying to append complex data to my database products in Magento ver. 1.7.0.2, some are simple and other configurable. The exported Magento CSV doesn't greet with the needs for importing. I have this file for example for importing data: sku,_store,_attribute_set,_type,_category,_root_category,_product_websites,price,special_price,special_from_date,special_to_date,image,media_gallery,news_from_date,news_to_date,url_key,url_path,minimal_price,visibility,custom_design,custom_layout_update,page_layout,options_container,required_options,has_options,image_label,small_image_label,thumbnail_label

Magento get cart single item price incl. tax

孤街浪徒 提交于 2019-12-03 11:55:05
I have a pretty weird issue, I hope someone can help me with this. Here are the major config settings that influence my problem: Catalog prices in admin panel are shown including tax Catalog prices in frontend are shown including tax Items in shopping cart are shown excluding tax (so it's displayed separately near the subtotal). Everything is working fine so far. The problem comes in a custom ajax mini cart module. I grab the collection of items from the cart, but, since I'm getting the price from the shopping cart item, I get it without tax. Here is some code to exemplify what I mean. I will

Magento Custom Module: multiple Image Uploader in adminhtml form

五迷三道 提交于 2019-12-03 07:57:02
i have created adminhtml module it is working fine. in create new item form there are 4 field name , images, url and email id; i have used file uploader to upload images . it is working fine but i am not able to upload multiple images. is it possible to have multiple image uploader? here is my simple image uploader code. if(isset($data['image']) && $data['image'] != ''){ $finderLink = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) .'finder/store_locator/'.$data['image']; $finderName = $data['image']; $fieldset->addField('imagelabel', 'label', array( 'label' => Mage::helper('finder')->

Magento: Get product price given a customer group

假如想象 提交于 2019-12-03 07:17:17
问题 On magento 1.7 I created a promotional price rule of 20% discount for "special members" customer group. I'd like to display both prices. I thought there would be something like $_product->getPriceByCustomerGroup( $groupId ); Goal (not logged in): Regular price: $10.99 Member price: $5.99 (member logged in): Regular price: $10.99 Member price: $5.99 回答1: Ok, bit of a muck around, but I think I have it. You can grab the price for the specific group id (3 in the case below) by calling

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction by Magento position

為{幸葍}努か 提交于 2019-12-03 07:03:23
We have a problem in our Magento shop when we try to set the position of the products in a category from manage categories. When we try to save a product after changing the position in "category products" we get the following failure: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction Does anyone know how to solve this? The error occurs most probably because you have the product position index set to auto and Magento tries to rebuild the index along with the product save. Go to System->Index Management and set the indexes related to

Exporting order details magento

戏子无情 提交于 2019-12-03 06:08:20
问题 I am looking to export order information for all the orders from a magento system i want to migrate from. These are the fields I require Order_id, sku, item_quantity, item_price, order_total_amount, Created_at, Billing_address, Billing_city, billing_state, billing_country, billing_zipcode, billing_customer_name, billing_customer_mobile, billing_customer_email, shipping_address, shipping_city, Shipping_state, shipping_zipcode, Shipping_country, shipping_charge, shipping_customer_name, shipping

Get product id and product type in magento?

你。 提交于 2019-12-03 05:46:01
问题 I am creating magento store. I am beginner in magento. I want to get product id and product input type in my phtml file is this possible? please guide me.. I am trying to this way to get product type. but its not working for me $product=Mage::getModel('catalog/product')->load($product_id); $productType=$product->getTypeID(); Please guide me... 回答1: Try below code to get currently loaded product id: $product_id = $this->getProduct()->getId(); When you don’t have access to $this, you can use

wamp tmp folder takes some GB of space while running magento in localhost

流过昼夜 提交于 2019-12-03 05:37:06
wamp tmp folder takes some GB's of space while running magento in localhost , like this some files are created in Wamp/tmp folder, while i using magento cachegrind.out.1367384833 cachegrind.out.1367384834 cachegrind.out.1367384835 file contain code like this version: 1 creator: xdebug 2.2.0 cmd: C:\wamp\www\magento\index.php part: 1 positions: line like this it contain some 80k lines in each file how to solve this problem? thanks in Advance That seems to be due to profiling enabled in Xdebug. Set xdebug.profiler_enable=0 in your php.ini and restart the server to see if it fixes the issue. 来源:

Updating Magento Attribute Programmatically

北战南征 提交于 2019-12-03 05:19:57
问题 I have been writing a script that updates my attribute add_ten_pence , the attribute is a yes/no boolean value. At the moment it goes through the SKU's in the database but unfortunately it's not updating the database. I have pasted the script below does anyone know where I'm going wrong? The attribute is set to 'No' as default, and I wish to change it to 'Yes' when the script runs, and vice versa. require_once('app/Mage.php'); umask(0); Mage::app('default'); Mage :: app ()->setCurrentStore