Monthly Archives: August 2013

Magento adding Super Attribute to configurable products

In previous post mentioned how we can remove the attributes from configurable products..But now the case is reverse if we want to add super attribute in Already existing Products ..so there also we need to create the RAW query…we are trying to make the module

Create attribute
  •     Drag it to appropriate attribute set
  •     Go to phpmyadmin, table ‘catalog_eav_attribute’ and look at the last one, note the ‘attribute id’, also note the product id -> go to catalog_product_entity and look for the configurable product you want, and note entity_id -> this is the product_id
  •     Go to catalog_product_super_attribute and insert new record with product_id and attribute_id, note of the product_super_attribute_id
  •     Go to catalog_product_super_attribute_label and insert new record with product_super_attribute_id and the value of your new attribute, like ‘Color’ or ‘Size’ which you used when adding the attribute in the admin
  •     Go back to admin and click the configurable product, you will notice none of your child products is associated to your configurable product.
  •     Click one of the child products, and select appropriate attribute value, you may also change the sku.
  •     Export all child products and add the new attribute and sku values to it, import it back and you are done or you may have to manually change all in the admin without using the dataflow.

Hope this will help you

Magento Remove Super Attribute from Configurable Product

Sometimes We need to remove the Attribute from already build Configurable product…As it is hard to remove but we can remove from MYSQL Raw Query …which against the Standard but if it is requried we can edit like this
To remove one super product attribute (as they are called) from all configurable products, you could execute this SQL query in the database:

DELETE FROM catalog_product_super_attribute WHERE attribute_id = "attribute ID which should be removed"

The table catalog_product_super_attribute links products to super product attributes. You can add and remove attributes to created configurable products there.

Hope this will Help you!

Magento compilation shows blank page

Magento Admin compilation mode shows blank page
becausesome of the module is not working so below step help you to bring the Compilation mode page
Open a command prompt to the root of your store, and type

$ cd shell
$ php -f compiler.php help

state         Show Compilation State
compile       Run Compilation Process
clear         Disable Compiler include path and Remove compiled files
enable        Enable Compiler include path
disable       Disable Compiler include path
help          This help

This is a list of commands to use with the compiler.
now,Type the following

$ php compiler.php compile
Compilation successfully finished

This may take a few minutes, as Magento is traversing your system and pulling out every possible class. If you take a look at the includes/src directory, you’ll see all your classes.

You can also get some stats on your compilation by typing

$ php compiler.php state
Compiler Status:          Enabled
Compilation State:        Compiled
Collected Files Count:    5602
Compiled Scopes Count:    4

After compiling your classes, Magento immediately puts itself into “read from the compiled code” mode. You can turn this off by doing

$ php compiler.php disable
Compiler include path disabled
$ php compiler.php state
Compiler Status:          Disabled
Compilation State:        Compiled
Collected Files Count:    5602
Compiled Scopes Count:    4

Your compiled classes will still be there, but now Magento is loading classes from its normal code pools. If you wanted to remove the compiled classes, running

$ php compiler.php clear
Compilation successfully cleared
$ php compiler.php state
Compiler Status:          Disabled
Compilation State:        Not Compiled
Collected Files Count:    0
Compiled Scopes Count:    0

will do the trick. Clearing the files will also automatically disable compiler mode.

and your admin page will come ..there is also mauall way if you don't have the ssh login
just open the includes folder of root and comments the following line

#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
#define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');

Hope this will help you