Completed

Magento PHP functions required

We urgently require 3 specific function to be written in PHP for Magento.

Function 1 :

Pass in a Magento Configurable Product ID. Return an array (or comma delimited string) containing the Magento product ID's that are already attached to the configurable product.

Function 2 :

Pass in a Magento Configurable Product ID, an array of existing Simple Product ID's and the names (not the id's) of two attributes that will be used for grouping. The function must add the new products to the existing Configurable product. (Must also keep any existing associated products) Note : The Simple products that are being added will already exist and will contain values for the given attributes. You may need to lookup the simple products to get the actual attribute values if they are required as the values will nto be passe dinto the function (only the attribute names).

Function 3 :

Pass in a Magento Configurable Product ID and a Simple Product ID. Function must remove the Simple product from the Configurable product (Must leave all other existing associated products).

All functions must use Magento Models and cannot read/write directly from the database or use the external API. (Function 1 can use direct database "read only" access if it is faster and/or easier)

ie. Code must use object code similar to (but not necessarilly the same as) :

$product = Mage::getModel('catalog/product');

$product->load($product_id);


Examples of how the functions will be called

In all cases, assume :

Magento product ID 1 is a configurable product with 2 attributes called Color and Size.
Magento product ID 2 is a simple product (Red, Size 10)
Magento product ID 3 is a simple product (Blue, Size 12)
Magento product ID 4 is a simple product (Blue, Size 10)

Function 1:

$result = getSimpleList(1); // Return simple products attached to Configurable product ID 1

Function 2:

addSimpleItems(1, array(3,4), array('color','size')); // add magento product ID 3 and 4 to the configurable product. Note : Item 2 is already attached from a previous call. The final attached list should be item ID 2, 3 and 4

Function 3:

removeSimpleItem(1, 4); // remove product ID 4 from the configurable product ID 1. This should leave item ID's 2 and 3 still attached

Skills: Magento, PHP

See more: magento php functions, magento functions, php function required, php is object, remove object, Magento PHP, magento note, magento database, magento catalog, magento APi, load php, magento add product attribute, magento associated, php string contain, write simple php database, magento associated product, remove functions, delimited access, php lookup, php catalog database, simple magento, access functions, can php read access, already exist, magento simple product configurable product

About the Employer:
( 3 reviews ) Surfers Paradise, Australia

Project ID: #1088967

Awarded to:

Makor

Please check PM.

$60 USD in 1 day
(21 Reviews)
4.9

4 freelancers are bidding on average $122 for this job

morff

I'm skilled Magento Commerce developer and i will gladly create this functions for you. Please feel free to ask me any question or to send me more information via PMB. Thank you. PS: Please note there is significant ti More

$49 USD in 1 day
(117 Reviews)
6.0
whizpoolbd

Please check the PMB

$230 USD in 5 days
(7 Reviews)
5.2
RTzine

STOP !!! STOP LOOKING AT ANYMORE BIDS !!! Friend,your search really ends here. Get your work done right and as it is you are expecting. check our private message then decide yourself. Thanks

$149 USD in 7 days
(13 Reviews)
4.5