Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [magento-1.8]

Magento Community version 1.8

5
votes
1answer
738 views

how to Change Uploaded Product image disabled value

I uploaded product image programatically by using following code. $files = $_FILES['images']['name']; $f = substr($files,0,1); $s= substr($files,1,1); $absolute_path = Mage::getBaseDir('media').DS.'...
5
votes
1answer
800 views

Join Collection With Country Table

I have stored country id in my custom table. How to join the my custom collection with country collection to get a Country Name. I have tried below code but its not working : $collection = Mage::...
5
votes
1answer
7k views

Magento 1.8.1 updates customer “created_at” time on every save [duplicate]

I just installed a fresh copy of magento 1.8.1 (was having this same problem on my production site) and every time a user edits their account the "created_at" value is updated in the database. And it ...
5
votes
1answer
7k views

Magento custom module adds HTML to header

I try below code is working for add a phtml file in header of Magento. <reference name="header"> <block type="your_module/yourblockclass" name="yourblockname" template="your_module/...
5
votes
1answer
70 views

Customisable products rule/restiction based

So I know how to create customisable products but what I want to do is create a customisable product with rules. It's for an electrical website so for example the customer can create a 12 gang pdu ...
5
votes
1answer
3k views

Invalid Signature - add a product using Magento REST API

i have created AccessToken and AccessTokenSecret as mentioned in the Oauth Rest API Documentation and I am able to retrieve the products using GET Request. But when i try to Create a new product (POST ...
5
votes
4answers
3k views

How to update existing cms page through install script

I have this script <?php $cmsPage = Array ( 'title' => 'Test Page 1', 'root_template' => 'one_column', 'identifier' => '...
5
votes
1answer
3k views

Make discount rules for bundled products

What I am trying to do is applying discount ONLY to bundled product according to the quantity of the selections it has.My Bundled products have one option, checkbox with multiple simple products and ...
5
votes
1answer
899 views

New Product Type - type_id - new order

I am developing a new product type. I based my tests on http://www.solvingmagento.com/creating-a-custom-product-type-in-magento/. I have renamed all the code to suit my company name. The custom ...
5
votes
1answer
217 views

PHPUnit add products to cart and shipping methods

I have followed the instructions here on how to link Magento up to PHPUnit and THAT works. I have created some custom shipping methods that, based on the order weight, order total, and a couple of ...
5
votes
1answer
3k views

Magento 1.8 static block in widget not showing?

I have created simple static block and trying to show it through widget inside Left Column but its not showing. In fact any static block is not working through widget. I have created magento theme in ...
5
votes
2answers
70 views

Can't login to staging servers without deleting cookies first. Magento 1.9

We have multiple clones of our main shop at www.mainsite.com for testing and developing. e.g. test.mainsite.com, fbk.test.mainsite.com and isk.test.mainsite.com, There is a big issues with the ...
5
votes
0answers
89 views

How to do the same controller action to create an image for one button but not for another?

We are calling same controller action for 2 buttons for create product programmatically and assign a custom image for that product. create - custom image uploading for newly created product login - ...
5
votes
3answers
1k views

Magento Cron is not run on windows

I want to run the cron job on magento, but the cron events are not appeared. This is my etc/config.xml file. <crontab> <jobs> <imagerecycle_imagerecycle> &...
5
votes
1answer
349 views

Entering credit-card only once for phone orders (admin screen)

We like to take phone orders using the admin interface. Unfortunately it can be a real pain because we have to re-enter the credit card information everytime the customer decides to change the ...
5
votes
2answers
406 views

Paypal Authorization is voided in magento

I am getting following error in magento admin panel : PayPal gateway has rejected request. Authorization is voided (#10600: Authorization voided). I have voided the transaction from paypal account and ...
4
votes
5answers
4k views

Magento generating aprox 20 session files per minute

I have a problem with a Magento installation. This installation is not live and as such has no traffic etc. I watched in cpanel's file manager and it appears to be generating 15-25 files per minute in ...
4
votes
6answers
15k views

Magento Fatal error: Call to a member function getMethodInstance() on a non-object in app/code/core/Mage/Payment/Model/Observer.php on line 46

I’m trying onepage checkout. When I'm exiting 2co payment page by clicking on Place order button I'm navigating back to my site and the URL looks like this. https://www.example.com/index.php/checkout/...
4
votes
3answers
19k views

How to add quantity option to each product item in the category list page?

How can I add quantity option to each product item in the category list page? By default, you can find this in Magento list.phtml, <?php if($_product->isSaleable()): ?> <p><...
4
votes
3answers
2k views

How to remove Export option from Sales/Order grid?

I want to remove the following from sale order grid: New Order RSS Export to: MassAction block for a particular admin user role. I currently use adminhtml_block_html_before event to remove the ...
4
votes
2answers
2k views

Create folder during install module

So, I create module, which implement import/export some data. Everything work fine. The logic of import in next : I take a file in var/[module_name]/import/. (This file will be put by some another ...
4
votes
1answer
1k views

Rerun an extensions SQL files

Whats the best way to rerun an extensions SQL files for example mysql4-install-0.1.0.php mysql4-install-0.1.1.php mysql4-install-0.1.2.php mysql4-upgrade-0.1.0-0.1.1.php mysql4-upgrade-0.1.1-0.1.2....
4
votes
6answers
6k views

Admin login looping around

I'm having the problem where I can't log into the backend of Magento 1.8 after I've pulled it onto my local vagrant box. When I log in using an incorrect password, I get an error message. When I use ...
4
votes
2answers
1k views

Can I make a core module depend on a custom module?

I'm tying into the event catalog_block_product_list_collection to add additional sort options onto the collection. However, the class Mage_Review_Model_Observer is also listening to this event. The ...
4
votes
3answers
9k views

Is there a way to add Category column to admin Product Grid?

I am trying to add a column to a module that will shows products and the related category. I have been able to show the product names etc put I am not able to get the category name to show in the grid....
4
votes
6answers
13k views

Bulk Import Category With Heirachy

I'm still a Beginner in Magento and I was given a task to upload/create 600 Categories and have a hierarchy up to 4th subcategory. I've been searching for a while now, and most return paid extensions. ...
4
votes
2answers
6k views

how to show and hide field in magento admin form on change function

i need to hide form field on on change in magento admin. I need to know that how can i show hide field with his labels in magento admin form my form $fieldset->addField('style_content', 'select', ...
4
votes
3answers
10k views

how can we get category by name and parant category id?

How can I check category have any child category with specific name ? $category = Mage::getModel('catalog/category')->load($name, 'name'); but I want sub category from specific parent category.
4
votes
2answers
2k views

Newsletter tab in admin backend disappeared after upgrade from 1.6 to 1.8.1

I've recently upgraded a site from 1.6 and I've had some minor issues which I've mostly resolved now. My final hurdle is the newsletter tab which have mysteriously disappeared. Any idea why it's gone ...
4
votes
2answers
106 views

Third language should have own configuration

Today my store support two different languages. Where the root domain is English and /no is Norwegian. They both share the same prices with NOK being the base currency. However we are about to add a ...
4
votes
4answers
6k views

Add extra field in existing table

I added following codes in my app\code\local\Svi\Form\sql\form_setup\mysql4-install-0.1.0.php <?php $installer = $this; $installer->startSetup(); $installer->run(" -- DROP TABLE IF EXISTS {$...
4
votes
2answers
1k views

Google analytics showing Paypal as transaction source

I have google analytics set up with my magento store and I have the ecommerce feature enabled. However when a customer purchases a product using paypal. Google analytics shows that the traffic ...
4
votes
4answers
6k views

Updating stock causing foreign key constraint fail

So, I'm trying to update product quantities programmatically. On a standard magento install, it works flawlessly, but on the actual magento shop I'm developing it for, it fails with a SQLSTATE[23000]: ...
4
votes
1answer
9k views

rewrite url using config.xml

I'd created a module and the url for the same is something like: http://magento.korenpub.com/designer/index/index/id/26/value/Joseph%20B.%20Soloveitchik but I need to rewrite the url to http://...
4
votes
3answers
8k views

How to add multiple product to magento cart from outside of magento?

I have to add multiple items into magento cart from out side of magento (external website), through /path/to/app/checkout/cart/add?product=[id]&qty=[qty] this method I can add one product to the ...
4
votes
1answer
1k views

Magento 1.8.1.0 Google Checkout missing - comparing to 1.8.0.0

I got errors in logs related to Google Checkout, I found that Magento 1.8.1.0 doesn't have Google Checkout in configuration, also file app/design/frontend/base/default/layout/googlecheckout.xml is ...
4
votes
2answers
3k views

How to programatically disable shipping method in magento

I am using two shipping method Free shipping and flat rate shipping . Here is two condition when a user try to buy "apple" from state "abc" then flat rate shipping available for this user.and another ...
4
votes
2answers
5k views

Determine MySQL Database used by Magento Installation

This question is probably fairly stupid but I installed a couple instances of Magento (for various reasons) and I made the MySQL database names very similar. In fact they only vary by some arbitrary ...
4
votes
4answers
11k views

What is the best way to delete a Magento order?

Synopsis I would like to delete test orders from my Magento store because they affect the statistics and reports of sales. Would the following code delete all records from: sales/order_invoice sales/...
4
votes
2answers
5k views

add carrier name in dropdown same as Fedex and etc

Want to add the carrier name in dropdown same as default carriers in shipment admin panel, how can I set it ? Please see picture
4
votes
1answer
7k views

“Save and Continue Edit” button is not working properly

I have a form in my module, and now I want to add the new button to it i.e. Save and Continue Edit button. I added this button but it is working partially, means it is saving the values in the ...
4
votes
1answer
5k views

Get product prices with multiple websites

I have setup my Magento with 2 websites, with ID 1 and 4, and one store for each website. My product has 3 prices: a Default price, and a price for each website. How can I get these 3 prices ...
4
votes
1answer
8k views

what should be in type attribute of block

I think I am confused because after going so further in learning magento, I am getting this basic doubt now. The problem is that I created a new block in layout of my created theme folder. The thing ...
4
votes
2answers
643 views

How I can disable cache for one file that include in cms page?

I have including of phtml file in cms page (home page) {{block type="catalog/product_new" product_ids="6747,4652,605,571,518,182,4432,4425" template="catalog/product/home_slider.phtml" }}, and I need ...
4
votes
3answers
2k views

Event of clicking checkout button

At the moment I have an observer running on the sales_quote_save_before event to check if the customer's cart has a subtotal greater than £100 if they belong to a particular customer group. This ...
4
votes
4answers
6k views

Show product only within a date range (between start date and end date)

I want to create a product with start date and end date. Once the end date comes the product should be hidden from the product listing. Are there any methods to complete this task? I tried with ...
4
votes
1answer
6k views

Set created_at when programatically creating a Magento order

I'm struggling to set the order date when creating a magento order programatically. Here is what I'm trying to use: $orderObj->setData('created_at', $date); $orderObj->setUpdatedAt($date); but it ...
4
votes
2answers
4k views

Invalid argument supplied for foreach in Mage/Eav/Model/Entity/Collection/Abstract.php on line 776

After upgrading magento to 1.8.1.0 (from 1.7.) I am now seeing this error in my system.log: 2014-05-26T10:39:56+00:00 ERR (3): Warning: Invalid argument supplied for foreach() in app/code/core/...
4
votes
2answers
5k views

layered navigation for custom product collection on custom page

I'm working on a module where some products have an attribute named designer. and for every designer, all products by him displayed as catalog category view. So far I'm able to filter the products ...
4
votes
2answers
8k views

Adding something to Product View

I want to add something (a small text or image) before the price. The only way to do is to update the catalog_product_view template and copy the whole view.phtml in my module and then add the thing i ...