Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [php]

This tag is used for questions which involve PHP code in any way. So as soon there is a PHP Exception returned or error report generated, this question qualifies to be tagged with PHP.

1
vote
1answer
1k views

How to send JSON POST data for admin module?

I am trying to send a POST request to a controller with JSON payload. Relevant request details are as follows. Request URL:http://mag.local/index.php/shahal/test/saveJson Request Method:POST Content-...
2
votes
0answers
1k views

Cannot Access Magento Admin after Server move [closed]

I have install magento 1.7.0.2 on a new server and have copied the database from my old site on a different server, I have changed the core_config_data details to match and the site config. and the ...
0
votes
3answers
3k views

Programmatically updating product stock breaks script

I have a script which reads a text file which contains sku information. Then in a loop the script loads each product's ID then creates the product object: $id = Mage::getModel('catalog/product')-&...
3
votes
2answers
5k views

Remove required fields from magento admin panel

My client ask me to remove the required option from some fields in the product form from magento admin panel, because he don't want to fill this fields. I need to say to magento that the field Short ...
3
votes
3answers
5k views

Magento reindex from command line, still having timeout error

I'm trying to reindex my catalog_url_rewrite table (Magento website) through the command line using the command "php indexer.php --reindex catalog_url" in /shell. I get the following error: PHP Fatal ...
1
vote
2answers
3k views

Load details of a root category and subcategories

How do i load all the sub categories of a particular Root Category? I need to form a tree like structure for traversing all the sub categories (including the inactive ones). Kindly help.
0
votes
1answer
83 views

can't load 2 products using load by id method in magento

Friends, I wanna load 2 bundle products using load by id method. this is the code that i have written for that... <?php $bundled = Mage::getModel('catalog/product'); $stdid=$bundled->getIdBySku(...
0
votes
2answers
5k views

How to set root category for all stores in a website?

How do i set a new category for all the stores in a website? I've created a new root category via my custom module, and need to make this as the root category for all the stores in a particular ...
16
votes
3answers
27k views

Magento : Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in …/app/Mage.php on line 546

I have installed one module extension which throws an fatal error "Fatal error: Class 'Mage_Giftcards_Helper_Data' not found in ..../app/Mage.php on line 546" in admin. I have reffered this link ...
5
votes
1answer
2k views

Sorting of Categories based on a attribute of product item

In my project, by default, I have some categories which are visible in frontend as shown below: category-1 sub-category-1 sub-category-2 category-2 sub-category-1 category-3 ...
2
votes
2answers
2k views

Going from Admin Panel to Source Code and finding out what is running under the hood

I have a simple example. Say my system is messed up and I want to disable the cache manually because my admin panel is not working. How do I go from figuring out what component is run, and what php I ...
-2
votes
3answers
2k views

how to learn php for magento [closed]

I am a dotnet programmer and new to Php, magento. After some struggle now I m able to understand magento flow (layout, blocks, controllers). Now trying to understand phtml files. I know only some ...
4
votes
2answers
9k views

Code before a controller's action is executed?

I would like to write some custom code before any actions in a controller is executed. It would seem like an easy one, but i am unable to find help anywhere in google. I tried to override preDispatch()...
1
vote
1answer
2k views

loading custom label for each product colour option magento

Thanks for taking the time to read this. I am attempting to show the image label for the alternative product images (colours). The issue is that title="<?php echo $_product->getProduct();?>...
8
votes
4answers
12k views

Get Price of Configurable Product options

I need to export all products with prices from Magento 1.7. For simple products this is no problem, but for configurable products I have this problem: The price exported is the price set for the ...
2
votes
2answers
1k views

Image doesn't upload in custom module magento

I have created custom module in magento with image upload attribute. Image name was successfully stored in DB table. But image doesn't upload to the target folder. I have tried with this following ...
2
votes
2answers
393 views

(NOT USERNAME?) in the toplinks section, cookie issue?

Sometimes I will see in the top header (NOT MYUSERNAME?) and items that I’ve added in the past in my cart, even know I’m not logged in anymore. This is extremely annoying and I haven’t seen a fix for ...
1
vote
1answer
401 views

Trying to pass details from last order event/observers

I am getting this issue now. I can pass the productId but the foreach it looks like it does not work, When customer order 2 items the result i get is just the last item productId. Here is the code: ...
1
vote
3answers
706 views

How to disable block/template overrides?

i am trying to create an adminhtml module. I need to change the adminhtml design heavily for this module. I've overridden some blocks which changed the html of the admin panel. But the problem is most ...
1
vote
1answer
8k views

How to create an image upload product attribute in magento?

I know to create new product attribute in magento by catalag->manage attributes. By the same way i have created an image upload product attribute.It was suceessfully created and also i have added this ...
0
votes
1answer
1k views

Somehow all products were deleted - Magento

This one is quite unusual. A client was bulk deleting products from Magento (latest build) and somehow nearly all products were deleted. Here is the client's description: Following a successful ...
1
vote
1answer
2k views

Magento not showing the right version in footer

My magento installation is showing ver. 1.7.0.2 in the footer, but /downloader is showing: Mage_All_Latest 1.8.0.0 (stable) I have cleared var/cache, var/session and var/tmp but it's still showing 1....
-1
votes
2answers
1k views

Custom Design/Layout for Simple Products

I’m trying to customize simple products separate from grouped products. I’ve gone as far as creating a layout in catalog.xml with this code below <PRODUCT_TYPE_simple translate="label" module="...
1
vote
1answer
4k views

How to set timezone when save and retrieve data on Magento

I've changed the System->Configuration->General->Locale Options->Timezone to ID and saved. the data is 2013-09-30 12:03 when saved. but when i see on Admin Grid the data is : Sep 30, ...
0
votes
1answer
1k views

Send multiple attachments via custom PHP form

We try to send attachments via a custom form. With the sendemailAction() in our IndexController.php we upload the files to a directory on the server and send them with the email. public function ...
3
votes
2answers
1k views

How to deactivate the user automatically after 90 days if he had no purchase with in 90 days

How to deactivate or inactive the user automatically after 90 days if he had no purchase with in 90 days. in our website
1
vote
2answers
5k views

Adding Magento's required structure to a php file

This is a weird request but I've done it before and it worked wonders. I have a need to make a custom PHP file in my sites root folder. I need to give this file access to all of the magento functions ...
4
votes
2answers
393 views

Potential PHP problems with EE 1.13 or CE 1.8

My client is on an old server running PHP 5.2.17, should I encourage him to upgrade to 5.3 or will it be ok?
4
votes
4answers
13k views

How to add Access-Control-Allow-Origin to Magento? PHP solution possible?

As a near final step before launching, we have activated SSL/secure pages for checkout etc and are running into the headaches it brings with cross origin requests. We have an ajax cart function that ...
1
vote
1answer
2k views

Add custom classes to magento

I have custom classes 4 to 5 written in php.I want to move that to Magento as they are now.Can i do that ,And second thing how i will include if they are not in root folder ?
2
votes
1answer
3k views

Cannot get configurable product to show after adding via PHP without running full index

Been stuck on this for hours spinning my wheels. I have script that builds some products based off a CSV. First it builds a few simple products, then a configurable product with those simple products ...
1
vote
2answers
5k views

Unable to reindex Product Prices - Foreign Key Constraint Fails

I've just recently upgraded my magento store from 1.4.2 to 1.7.0.2.. And The upgrade went smoothly but when I try to reindex data after the upgrade.. It fails on the Product Prices.. I've tried using ...
3
votes
1answer
4k views

Calculating price savings ($_msrpPrice minus $_regularPrice)

I've confused myself enough with this one - no idea what I'm doing wrong. So we enter the MSRP for products in Magento and display this price in the front end with a strike through. In this example, ...
1
vote
2answers
671 views

Creating a new theme

I am new to magento. Trying to create my own theme. I have gone through the designers guide. I created a folder example inside base folder as shown below: app --> design --> frontend --> ...
1
vote
1answer
87 views

Override PDF tax settings

We override the Mage_Tax_Model_Config to have different tax settings for specific customer groups. Everything went well except for the PDF documents. We checked the current customer group ID with $...
0
votes
2answers
1k views

How to download a image in magento admin panel from ordered items

I have been trying to give a link to admin panel for downloading the product image ordered in sales > order > view. Now its done and I have given the link to download as www.example.com/...
2
votes
1answer
4k views

Magento Sales Order view Item ordered block

I have been trying to give link to download the product image added by user in sales view order's item ordered phtml(currently it shows only product image name). I'm new to magento and have no idea ...
0
votes
1answer
1k views

How to Bypass Admin Area Authentication for Testing

I want to speed test Magento admin area with some 3rd party tool. However I can't do it as Magento admin area requires authentication. Is there any way to disable it?
-9
votes
2answers
23k views

How do I set a Magento page's template to the 2-column layout? [closed]

Using the Magento layout XML, how do I set the page to use the 2-column layout template?
0
votes
1answer
2k views

Getting Magento Paging to show Below Products

I am building a site using Magento 1.7.2. On my products page I am trying to get the paging at the top of the products to also show below. I have looked at the toolbar.phtml file, catalog.xml file and ...
1
vote
2answers
1k views

Magento 1.7 Advanced Search Out of Order?

I have a website and I am using Magento 1.7.2 cart. I am also utilizing the Advanced Search. My problem is when you select "All" from Power Watts under advanced search then click search the product ...
1
vote
1answer
1k views

Magento Advanced Search not showing Nav Bar

I am running Magento 1.7 and I am having a problem getting my Advanced Search to show the next/previous buttons of found products. I have look at the following php pages and everything seems oaky. ...
3
votes
1answer
2k views

Magento Model Filter by Category Returns No Products

I'm using Magento EE Lite (1.11.02) and I'm trying to load a collection of products by one single category. The following code functions as you would expect: public function getProductList() { $...
7
votes
2answers
5k views

Impossible to save category with more that 1000 products

This is a known issue caused by PHP 5.3.9 and max_input_vars that by default it is set to 1000. The solution 2 proposed here it is the best in my opinion but doesn't work: for some strange reason it ...
21
votes
7answers
23k views

I am starting out learning Magento with no PHP experience, what are my options?

I have programming experience and HTML experience and am struggling to find a good guide for beginners. The Magento website seems pitched at experts but I could be looking in all the wrong places. ...