Jump to content

[SOLVED] Attributes Module


tobbecokta

Recommended Posts

Hi,
 
I need a module developed and will pay $250 to the first company that can help me with this.
 
BACKGROUND
I buy my products in bulk with 1000 units in each box. I then sell the product in packs using attributes. For example;
5-pack of shirts
10-pack of shirts
15-packs of shirts
20-packs of shirts
 
 
OBJECTIVE
Create a module that changes products attributes in the following way;
- On / off button on each product page for this module
 
- All attributes should use the same stock
 
- The attributes should reduce the stock quantity appropriate, for example
5-pack of shirts should reduce the stock with 5 units
10-pack of shirts should reduce the stock with 10 units
15-pack of shirts should reduce the stock with 15 units
20-pack of shirts should reduce the stock with 20 units
 
- Show the correct stock availability. If for example the stock consists of 20 units, then the stock availability should show the following for the attributes on the product page:
5-pack of shirts – 4 in stock
10-pack of shirts – 2 in stock
15-pack of shirts – 1 in stock
20-pack of shirts – Not in stock
 
- Also; You must make sure that when an order is made the correct quantity is sent with the order, through my existing order transfer module, to my accounting software which I use for stock management. For example;
If the customer buys product with the attribute 20-pack of shirts then the E-conomic accounting software module should remove 20 units from it’s stock.
 
 
GOOD TO KNOW
I use the module http://prestashop.butikki.dk/product.php?id_product=10 to transfer orders from Prestashop to the online accounting software E-conomic. I use this system to keep track on my stock, therefore I need the correct stock reduction to be sent over to E-conomic when orders are transferred.
 
I am running Prestashop 1.5.6.1.
 
 
TIMELINE AND PAYMENT
I would like to have this module developed as soon as possible. I have had issues with developers not completing or even starting working on modules, so therefore there first to provide me with a fully working demo will be paid.

I offer $250 for this module. Of course upgrades are needed along the way when Prestashop is updated and you will get paid for doing those upgrades as well.
 
Feel free to contact me through this thread or by PM!

 
Best Regards,
Tobias
 
 
___
 
Edit = Marked the topic as solved
Edited by tobbecokta (see edit history)
Link to comment
Share on other sites

Hi

 

Here is the solution of  All attributes should use the same stock:

 

You need to add same stock for every attribute of product. say you have 1000 units of product. so you need to add 1000 units in 

quantity for each attributes (5-pack of shirts ,10-pack of shirts etc.) and also need to override the StockAvailable class to modify the the function "updateQuantity".

 

 



class StockAvailable extends StockAvailableCore
{

/**
* For a given id_product and id_product_attribute updates the quantity available
*
* @param int $id_product
* @param int $id_product_attribute Optional
* @param int $delta_quantity The delta quantity to update
* @param int $id_shop Optional
*/
public static function updateQuantity($id_product, $id_product_attribute, $delta_quantity, $id_shop = null)
{
            
            parent::updateQuantity($id_product, $id_product_attribute, $delta_quantity, $id_shop);
            
            if($id_product_attribute != 0 && in_array($id_product,YOUR_PRODUCT_IDS_ARRAY){ 
                Db::getInstance()->Execute('
                                    UPDATE `' . _DB_PREFIX_ . 'stock_available` SET `quantity` = quantity + ' . $delta_quantity. '
                                    WHERE `id_product` = ' . (int) $id_product .' AND id_product_attribute != '. (int) $id_product_attribute .'
                                           AND id_product_attribute != "0" AND quantity > 0'
                                    );                  
                 
                $totalQntyArry = Db::getInstance()->getRow('SELECT SUM(quantity) as totQnty  FROM `' . _DB_PREFIX_ . 'stock_available` WHERE `id_product` = ' . (int) 


$id_product .' AND id_product_attribute != "0" ');
                
                Db::getInstance()->Execute('
                                        UPDATE `' . _DB_PREFIX_ . 'stock_available`
                                            SET `quantity` = '. (int)$totalQntyArry['totQnty'] .'
                                        WHERE `id_product` = ' . (int) $id_product .'
                                               AND id_product_attribute = "0" '
                                        );
            }    
            


   return true;
}




}


For rest of the points sent you PM.  :)

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

 

Webdev0008 has developed this module for me.

 

It has been a somewhat complex module to build, since I need it to connect to my SAAS accounting software, E-conomic. Webdev0008 has done this in a great way and offer me support even after the module has been delivered. He also did it in a very short period of time, delivering the module within the deadline we agreed upon!

 

It has been easy to communicate with Webdev0008 as he very often is only at Skype. I can tell that Webdev0008 has great knowledge of programming and Prestashop. Through the whole development phase he has been professional and I can strongly recommend Webdev0008 to anyone that needs to have a custom module developed!

  • Like 2
Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...