magento-1.7

How to create table for custom module in magento?

醉酒当歌 提交于 2019-12-04 19:40:26
I am new in magento. I need to create my own module (or) extension in Magento. In my module, table cannot be created in the magento table. I am using this code. File:/app/code/local/com_name/module_name/sql/module_setup/mysql4_install-0.1.0.php $installer = $this; $installer->startSetup(); $installer->run(" DROP TABLE IF EXISTS {$this->getTable('th_tweet')}; CREATE TABLE {$this->getTable('th_tweet')} ( `tweet_id` int(11) NOT NULL AUTO_INCREMENT, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `twitter_id` bigint(20) NOT NULL, `text` text NOT NULL, PRIMARY

Run an magento function cron at every hour

回眸只為那壹抹淺笑 提交于 2019-12-04 19:25:53
I want to run an magento function that would run at every hour , i am written code in config.xml but i did not working.here the code is <crontab> <jobs> <stockalert_autosend> <schedule><cron_expr>**/1 * * *</cron_expr></schedule> <run><model>stockalert/observer::backinstock</model></run> </stockalert_autosend> </jobs> </crontab> Please help me Use this cron expression for each hour: <cron_expr>0 * * * *</cron_expr> This will make it run at 12.00 , 1.00 and so on. If you want to make it run at 12.30 , 1.30 and so on replace 0 with 30 来源: https://stackoverflow.com/questions/21374844/run-an

How can I implement stock filter in Magento way?

社会主义新天地 提交于 2019-12-04 19:01:19
Out of stock products are visible in my magento website. I want a custom filter in the layered navigation which would say "Exclude out of stock" and when customer clicks on it the out of stock products should be hidden. (by default I enable showing/displaying out of stock products under System-> Configuration-> CATALOG-> Inventory) i.e. I want the customer to control whether he/she should see the "out of stock" products or not. example this link can anyone help please? I want this to be done in magento way... Chirag Nandaniya this is the development work. you need to hire some one. basically

bundle product import in magento

假如想象 提交于 2019-12-04 18:52:31
I have installed magento 1.7.2 version, now my requirement is to import Bundle products but by default magento won't provide these feature. So can anyone know that how can I import the bundle product from CSV file or if have any alternative solution then please advise. Thank you for your time and consideration. CSV Files contains: Fields: sku , _store , _attribute_set, _type, _category , _root_category , _product_websites , description , enable_googlecheckout , has_options , image , image_label , msrp_enabled name , bundle_options , bundle_selections , price , required_options , short

permission_block error in Magento?

有些话、适合烂在心里 提交于 2019-12-04 17:26:29
I have to installed Magento patches SUPEE 6788 , after that content on home page is missing, when i add blocks system->permission-> block it generate error SQLSTATE[42S02]: Base table or view not found: 1146 Table 'exclusiv_c523.permission_block' doesn't exist How can I proceed? The table permission_block should be created as part of the upgrade of Mage_Admin from version 1.6.1.1 to 1.6.1.2. You can verify that the setup/upgrade scripts succeeded by checking the version and data_version fields in the core_resource table: select * from core_resource where code = 'admin_setup'; Both values

Is it possible to update order items quantity in Magento?

柔情痞子 提交于 2019-12-04 17:18:08
I have tried to change magento order items quantity, but It doesn't work. Is it possible to change order items quantity using Magento own APIs, or do i need to use some own SQL in order to change order item quanties? $order = Mage::getModel('sales/order')->loadByIncrementId($orderId); foreach($order->getAllItems() as $item) { $item->setToCancel(5); $item->setToRefund(5); $item->setToInvoice(5); $item->setQtyToShip(5); $item->setQty(5); $item->save(); } // Why qtys are still same and not 5 as set before??? foreach($order->getAllItems() as $item) { echo "Id : " . $item->getId() . "\r\n" .

Magento design update to replace list.phtml on search results page only

时光毁灭记忆、已成空白 提交于 2019-12-04 16:59:19
How would I issue a design update to Magento to replace the list.phtml template only for the search results page? Is there more than one way to do it? It would be ideal if there was a way to do it through the admin panel like I can for individual categories, but if not then editing an xml file is okay too. You should create the file: app/design/frontend/YOURPACKAGE/YOURTHEME/layout/local.xml having the content: <?xml version="1.0" encoding="UTF-8"?> <layout version="0.1.0"> <catalogsearch_result_index> <reference name="search_result_list"> <action method="setTemplate"><template>custom/list

Magento 1.7+: How to use the page layout handle

青春壹個敷衍的年華 提交于 2019-12-04 16:50:10
After trying to debug for hours I'm out of ideas and hope for some clarification (I guess I missunderstood a concept at some point). The backstory: Some base categories need an "overview page" which should be generated automatically from child categories and products. So my approach was to add a sub category to every base category and create a custom page layout which is being used from all these sub categories. For my client this would be very easy to manage in the Magento backend since he would only need to change the value in one drop down. So I created a simple module defining the new page

Magento REST API OAuth

烈酒焚心 提交于 2019-12-04 16:43:26
Magento ver. 1.7.0.2 I'm new to Magento, REST and oauth. I want to be able to use the Magento REST API to be able to modify an online store with an inhouse Customer Management System. I have been able to set up Magento easily enough, but I'm struggling with REST, specifically with the oauth. I am currently running Magento on MAMP 2.1.1 on OSX 10.7.5. I was able to install OAUTH using these directions: Installing PHP OAuth in MAMP environment Following the Magento tutorial I am using the Firefox RESTClient to test OAuth. I have set up Roles and a Consumer in Magento, and put the keys in the

Remove shipping calculations from cart

我们两清 提交于 2019-12-04 15:57:14
How can I remove the shipping calculations from the cart of my store? This is the site: tintinportintin.com.br On line 89 in app/design/frontend/base/default/checkout.xml you wil find: <block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/> This line is responsible for showing that block. You can copy this XML file to your own theme and remove this line. But you can also use the <checkout_cart_index> handle and remove it. This can be done in local.xml for example. <checkout_cart_index> <remove name="checkout.cart.shipping" /> <