Jump to content
Sign in to follow this  
micm

paypal ipn + stock + qtpro

Recommended Posts

hello

 

Sorry for my english i am french -

 

i installed "osCommerce_PayPal_IPN_v2.3.2_1" with "qtpro4.3"

my trouble is

 

PayPal_IPN_v2.3.2_1 doesn't update attribute quantity after order

 

do you know the solution or do you have a solution on forum because i search but without success

 

thancks a lot

Michel

France

Share this post


Link to post
Share on other sites
hello

 

Sorry for my english i am french -

 

i installed "osCommerce_PayPal_IPN_v2.3.2_1" with "qtpro4.3"

my trouble is

 

PayPal_IPN_v2.3.2_1 doesn't update attribute quantity after order

 

do you know the solution or do you have a solution on forum because i search but without success

 

thancks a lot

Michel

France

 

hi there,

 

Did you get this problem fixed? I am having the same problem but I use "quantity_mod_1_2" - which can be found here http://addons.oscommerce.com/info/3302

 

I have had to revert back to using the old PayPal payment module which is rubbish!!

 

regards Jonathan

Share this post


Link to post
Share on other sites

I'm also using QT Pro and Paypal IPN(I don't know which version this Paypal IPN is, it came with the original Oscommerce download from Oscommerce 2.2 RC1) and my stock won't update in the qt pro section but it does update the TOTAL quantity in the edit product section(which doesn't help when you have product attributes.

 

I haven't tried this yet, but I was given advice to revert back to Paypal IPN 1.3 and use the guide on integrating QTPro in the Help file instructions. I'm going to try this in the next few days. I just hope it doesn't break Paypal IPN because I actually have that working except for this stock problem.

 

The reason this sucks is that the Version of IPN that auto sends the customer Invoice and the stock update trigger is IPN 2.0 but the version which gives instructions on how to integrate Paypal IPN and QT Pro is version IPN 1.3. So I have to pick one or the other. For now I've turned on Auto Return in my Paypal Account and I have to hope people won't leave the site before they are redirected back to mine to trigger the stock update and customer invoice.

 

Here is the link to get the 1.3 Paypal IPN and to get the instructions from the Help File on integrating it with QT Pro.

 

Scroll down the page and look for the section that says "osCommerce PayPal IPN Module v1.3 For 2.2MS2" (The first one listed) and inside there are instructions for integrating them.

 

http://www.oscommerce.com/community/contributions,2679

 

The person who told me this also said that the code changed between the 1.x contributions and the 2.x contributions so he didn't think it would work to use the same integration instructions with the new 2.3.3 IPN and QT Pro.

 

Please do me a HUGE favor and if you figure out how to get Paypal IPN to work with QT Pro, please post back here. If I get it to work I will let you know on this thread. This has been the BIGGEST PITA the last few weeks so I will be so greatful if you let me know of any progress with it.

Share this post


Link to post
Share on other sites
I'm also using QT Pro and Paypal IPN(I don't know which version this Paypal IPN is, it came with the original Oscommerce download from Oscommerce 2.2 RC1) and my stock won't update in the qt pro section but it does update the TOTAL quantity in the edit product section(which doesn't help when you have product attributes.

 

I haven't tried this yet, but I was given advice to revert back to Paypal IPN 1.3 and use the guide on integrating QTPro in the Help file instructions. I'm going to try this in the next few days. I just hope it doesn't break Paypal IPN because I actually have that working except for this stock problem.

 

The reason this sucks is that the Version of IPN that auto sends the customer Invoice and the stock update trigger is IPN 2.0 but the version which gives instructions on how to integrate Paypal IPN and QT Pro is version IPN 1.3. So I have to pick one or the other. For now I've turned on Auto Return in my Paypal Account and I have to hope people won't leave the site before they are redirected back to mine to trigger the stock update and customer invoice.

 

Here is the link to get the 1.3 Paypal IPN and to get the instructions from the Help File on integrating it with QT Pro.

 

Scroll down the page and look for the section that says "osCommerce PayPal IPN Module v1.3 For 2.2MS2" (The first one listed) and inside there are instructions for integrating them.

 

http://www.oscommerce.com/community/contributions,2679

 

The person who told me this also said that the code changed between the 1.x contributions and the 2.x contributions so he didn't think it would work to use the same integration instructions with the new 2.3.3 IPN and QT Pro.

 

Please do me a HUGE favor and if you figure out how to get Paypal IPN to work with QT Pro, please post back here. If I get it to work I will let you know on this thread. This has been the BIGGEST PITA the last few weeks so I will be so greatful if you let me know of any progress with it.

 

Ah right I see, so if we integrate IPN 1.3 with our other product attribute code it should work? For the time being I have just reverted back to the standard Paypal module that comes with osCommerce and I am going to just check my PayPal account everytime I receive an order to check that the money has gone into my account. Until we figure something out thats the only thing I can do, or update my quantities manually - which I don't really want to do!

 

I will have a look at the code today and see if I can figure something out.........even though I am not using QT Pro ( I wish I was because it looks much more flexible than the mod I have installed!!)

 

rgds Jp

Share this post


Link to post
Share on other sites

I discovered why my quantities were not updating after returning from PayPal (IPN version).

 

My site had the wrong directory name.

 

It should have been:-

 

/ext/modules/payment/paypal_ipn/ipn.php

 

Instead it said (incorrectly):-

 

/ext/modules/payment/paypal/ipn.php

 

I simply renamed the directory on the server to be paypal_ipn and the code now works and my stock is automatically updated.

Share this post


Link to post
Share on other sites
I discovered why my quantities were not updating after returning from PayPal (IPN version).

 

My site had the wrong directory name.

 

It should have been:-

 

/ext/modules/payment/paypal_ipn/ipn.php

 

Instead it said (incorrectly):-

 

/ext/modules/payment/paypal/ipn.php

 

I simply renamed the directory on the server to be paypal_ipn and the code now works and my stock is automatically updated.

 

 

Damn I got excited then, but my path is correct so it can't be that. It has to be because of the mixture code we are using from the quantity mods.

 

 

Could it be a small change to this code in this file /ext/modules/payment/paypal_ipn/ipn.php that is required:

 

 

// let's update the stock

#######################################################
	  for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { // PRODUCT LOOP STARTS HERE
// Stock Update - Joao Correia
		if (STOCK_LIMITED == 'true') {
		  if (DOWNLOAD_ENABLED == 'true') {
			$stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename 
								FROM " . TABLE_PRODUCTS . " p
								LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa
								ON p.products_id=pa.products_id
								LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
								ON pa.products_attributes_id=pad.products_attributes_id
								WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'";
// Will work with only one option for downloadable products
// otherwise, we have to build the query dynamically with a loop
			$products_attributes = $order->products[$i]['attributes'];
			if (is_array($products_attributes)) {
			  $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";
			}
			$stock_query = tep_db_query($stock_query_raw);
		  } else {
			$stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
		  }
		  if (tep_db_num_rows($stock_query) > 0) {
			$stock_values = tep_db_fetch_array($stock_query);
// do not decrement quantities if products_attributes_filename exists
			if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) {
			  $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];
			} else {
			  $stock_left = $stock_values['products_quantity'];
			}
			tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
			if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {
			  tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
			}
		  }
		}

 

Surely we need to update this to reduce the attribtue quantity too?

Edited by jpmad4it

Share this post


Link to post
Share on other sites
Could it be a small change to this code in this file /ext/modules/payment/paypal_ipn/ipn.php that is required:

...

Surely we need to update this to reduce the attribtue quantity too?

 

I think you are going in the right direction, i would compare the code between ipn.php to checkout_process.php.

they are awfully similar. I'm checking mine and still trying to figure out the difference.

Edited by oscnods

Share this post


Link to post
Share on other sites

Hi Guys

 

Any luck with this. Its a problem I have at the moment and my client doesn't want to keep checking things back against current levels.

 

I have the stock reducing on everything BUT the paypal payment, so I know thats where the problem lies, its just that my skill level doesn't let me take the problem too much further.

Share this post


Link to post
Share on other sites

I am aiming to crack this once and for all!

 

1.3 Paypal IPN with qtpro integrated does not work if the customer fails to return to the site. The point of IPN is they don't have to return!. Therefore you need to move the code that deals with updating the stock to ipn.php rather than integrating all of it into paypal_ipn.php.

 

I am attempting to integrate qtpro with paypal_ipn.php,v 2.3.0.0.

 

After moving the relevant code to ipn.php I have found that $order->products[$i]['attributes'] is taken from the orders table (from function query() in classes/orders.php) which does not include option ID and value ID needed for the stock update quarry.

 

order array with attributes from order tables

     $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");
       if (tep_db_num_rows($attributes_query)) {
         while ($attributes = tep_db_fetch_array($attributes_query)) {
           $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],
                                                                    'value' => $attributes['products_options_values'],
                                                                    'prefix' => $attributes['price_prefix'],
                                                                    'price' => $attributes['options_values_price']);

           $subindex++;
         }
       }

 

paypal_ipn.php accessed option ID and value ID using function cart() in classes/orders.php .

 

order array with attributes from product tables

        if ($products[$i]['attributes']) {
         $subindex = 0;
         reset($products[$i]['attributes']);
         while (list($option, $value) = each($products[$i]['attributes'])) {
//++++ QT Pro: Begin Changed code
           $attributes_query = tep_db_query("select popt.products_options_name, popt.products_options_track_stock, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'");
//++++ QT Pro: End Changed Code
           $attributes = tep_db_fetch_array($attributes_query);

         //++++ QT Pro: Begin Changed code
           $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options_name'],
                                                                    'value' => $attributes['products_options_values_name'],
                                                                    'option_id' => $option,
                                                                    'value_id' => $value,
                                                                    'prefix' => $attributes['price_prefix'],
                                                                    'price' => $attributes['options_values_price'],
                                                                    'track_stock' => $attributes['products_options_track_stock']);
//++++ QT Pro: End Changed Code
           $subindex++;
         }
       }

 

The next step is to access option_id and value_id in ipn.php so the line

 $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";

does not have missing values!

 

 

Here is the relevant code in ipn.php !

 

// let's update the stock  
#######################################################
         for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { // PRODUCT LOOP STARTS HERE
// Stock Update - Joao Correia
//++++ QT Pro: Begin Changed code
   $products_stock_attributes=null;
   if (STOCK_LIMITED == 'true') {
       $products_attributes = $order->products[$i]['attributes'];

//      if (DOWNLOAD_ENABLED == 'true') {
//++++ QT Pro: End Changed Code
       $stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename 
                           FROM " . TABLE_PRODUCTS . " p
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                            ON p.products_id=pa.products_id
                           LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
                            ON pa.products_attributes_id=pad.products_attributes_id
                           WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'";
// Will work with only one option for downloadable products
// otherwise, we have to build the query dynamically with a loop
//++++ QT Pro: Begin Changed code
//      $products_attributes = $order->products[$i]['attributes'];
//++++ QT Pro: End Changed Code


       if (is_array($products_attributes)) {
	/// Problem no option_id in $products_attributes array 
         $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";
	  $debug = " ********* $products_attributes[0]['option_id'] = " .  $products_attributes[0]['option_id'];
	  $debug .= " ********* $products_attributes[0][value_id] = " .  $products_attributes[0]['value_id'];
	  $debug .= "---------" . '<pre>'. print_r($products_attributes, TRUE) .'</pre>';
       }
       $stock_query = tep_db_query($stock_query_raw);
     } else {
       $stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
     }
     if (tep_db_num_rows($stock_query) > 0) {
       $stock_values = tep_db_fetch_array($stock_query);
//++++ QT Pro: Begin Changed code
       $actual_stock_bought = $order->products[$i]['qty'];
       $download_selected = false;
       if ((DOWNLOAD_ENABLED == 'true') && isset($stock_values['products_attributes_filename']) && tep_not_null($stock_values['products_attributes_filename'])) {
         $download_selected = true;
         $products_stock_attributes='$$DOWNLOAD$$';
       }
// If not downloadable and attributes present, adjust attribute stock
       if (!$download_selected && is_array($products_attributes)) {
         $all_nonstocked = true;
         $products_stock_attributes_array = array();
         foreach ($products_attributes as $attribute) {
           if ($attribute['track_stock'] == 1) {
             $products_stock_attributes_array[] = $attribute['option_id'] . "-" . $attribute['value_id'];
             $all_nonstocked = false;
           }
         } 
         if ($all_nonstocked) {
           $actual_stock_bought = $order->products[$i]['qty'];
         }  else {
           asort($products_stock_attributes_array, SORT_NUMERIC);
           $products_stock_attributes = implode(",", $products_stock_attributes_array);
           $attributes_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
           if (tep_db_num_rows($attributes_stock_query) > 0) {
             $attributes_stock_values = tep_db_fetch_array($attributes_stock_query);
             $attributes_stock_left = $attributes_stock_values['products_stock_quantity'] - $order->products[$i]['qty'];
             tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity = '" . $attributes_stock_left . "' where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
             $actual_stock_bought = ($attributes_stock_left < 1) ? $attributes_stock_values['products_stock_quantity'] : $order->products[$i]['qty'];
           } else {
             $attributes_stock_left = 0 - $order->products[$i]['qty'];
             tep_db_query("insert into " . TABLE_PRODUCTS_STOCK . " (products_id, products_stock_attributes, products_stock_quantity) values ('" . tep_get_prid($order->products[$i]['id']) . "', '" . $products_stock_attributes . "', '" . $attributes_stock_left . "')");
             $actual_stock_bought = 0;
           }
         }
       }
//        $stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
//      }
//      if (tep_db_num_rows($stock_query) > 0) {
//        $stock_values = tep_db_fetch_array($stock_query);
// do not decrement quantities if products_attributes_filename exists
       if (!$download_selected) {
         $stock_left = $stock_values['products_quantity'] - $actual_stock_bought;
         tep_db_query("UPDATE " . TABLE_PRODUCTS . " 
                       SET products_quantity = products_quantity - '" . $actual_stock_bought . "' 
                       WHERE products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
//++++ QT Pro: End Changed Code
       if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {
         tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
       }
     }
   }

// Update products_ordered (for bestsellers list)
   tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
//++++ QT Pro: Begin Changed code
   if (!isset($products_stock_attributes)) $products_stock_attributes=null;
   $sql_data_array = array('orders_id' => $insert_id, 
                           'products_id' => tep_get_prid($order->products[$i]['id']), 
                           'products_model' => $order->products[$i]['model'], 
                           'products_name' => $order->products[$i]['name'], 
                           'products_price' => $order->products[$i]['price'], 
                           'final_price' => $order->products[$i]['final_price'], 
                           'products_tax' => $order->products[$i]['tax'], 
                           'products_quantity' => $order->products[$i]['qty'],
                           'products_stock_attributes' => $products_stock_attributes);
//++++ QT Pro: End Changed Code
   tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
   $order_products_id = tep_db_insert_id();


// Let's get all the info together for the email
           $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
           $total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
           $total_cost += $total_products_price;

// Let's get the attributes
           $products_ordered_attributes = '';
           if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
             for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
               $products_ordered_attributes .= "\n\t" . $order->products[$i]['attributes'][$j]['option'] . ' ' . $order->products[$i]['attributes'][$j]['value'];
             }
           } 



// Let's format the products model       
           $products_model = '';      
           if ( !empty($order->products[$i]['model']) ) {
             $products_model = ' (' . $order->products[$i]['model'] . ')';
           } 

// Let's put all the product info together into a string
           $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . $products_model . ' = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
         }        // PRODUCT LOOP ENDS HERE
#######################################################

 

 

Any assistance would be very welcome :thumbsup: .

Edited by WS Evolution

Share this post


Link to post
Share on other sites

To get access to option ID and value ID I am going to add them to the orders_products_attributes table:

 

              // Gareth paypal-IPN QTpro
			  //$attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename
			  //Gareth added pa.options_values_id, pa.options_id for paypal ipn with stock control attributes !
			  $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename, pa.options_values_id, pa.options_id
								   from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                                      left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad
                                      on pa.products_attributes_id=pad.products_attributes_id
                                      where pa.products_id = '" . $order->products[$i]['id'] . "'
                                      and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'
                                      and pa.options_id = popt.products_options_id
                                      and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'
                                      and pa.options_values_id = poval.products_options_values_id
                                      and popt.language_id = '" . $languages_id . "'
                                      and poval.language_id = '" . $languages_id . "'";
                 $attributes = tep_db_query($attributes_query);
               } else {
                  //Gareth added pa.options_values_id, pa.options_id for paypal ipn with stock control attributes !
			  $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.options_values_id, pa.options_id from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $languages_id . "' and poval.language_id = '" . $languages_id . "'");
                  // paypal-IPN QTpro
			}
               $attributes_values = tep_db_fetch_array($attributes);

               $sql_data_array = array('orders_id' => $insert_id,
                                       'orders_products_id' => $order_products_id,
                                       'products_options' => $attributes_values['products_options_name'],
                                       'products_options_values' => $attributes_values['products_options_values_name'],
                                       'options_values_price' => $attributes_values['options_values_price'],
                                       'price_prefix' => $attributes_values['price_prefix'],
									// Gareth paypal-IPN QTpro Add options_values_id, pa.options_id to orders product attributes table
									'options_id' => $attributes_values['options_id'],
									'options_values_id' => $attributes_values['options_values_id']);
									// end paypal-IPN QTpro

 

I can then add option ID and value ID to $this->products[$index]['attributes'][$subindex] IN classes/order.php:

 

        $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix, options_values_id, options_id from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");
       if (tep_db_num_rows($attributes_query)) {
         while ($attributes = tep_db_fetch_array($attributes_query)) {

	   // Gareth paypal-IPN QTpro added:  options_values_id, options_id
           $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],
                                                                    'value' => $attributes['products_options_values'],
                                                                    'prefix' => $attributes['price_prefix'],
                                                                     'price' => $attributes['options_values_price'],
																  // Gareth paypal-IPN QTpro 
                                                                    'options_id' => $attributes['options_id'],
																 'values_id' => $attributes['options_values_id']);

Edited by WS Evolution

Share this post


Link to post
Share on other sites

I have also found that $attribute['track_stock'] is also missing, but rather than adding it I have commented out the if statement as all attribute options will be stock controlled.

 

 

 // if ($attribute['track_stock'] == 1) {
             $products_stock_attributes_array[] = $attribute['options_id'] . "-" . $attribute['values_id'];
             $all_nonstocked = false;
           //}

Edited by WS Evolution

Share this post


Link to post
Share on other sites

I have just tested and it seems to work :) Will have to test with multiple products , multiple attributes and any other different combination I can think of.

Share this post


Link to post
Share on other sites

I have just tested and it seems to work :) Will have to test with multiple products , multiple attributes and any other different combination I can think of.

 

 

Hi Gareth,

 

How did you go with your tests?

How different are the changes you made to the ipn.php as apposed to:

The contribution --- http://www.oscommerce.com/community/contributions,888

Post --- QTPro v4.6.1 - osC RC2a PayPal Standard integration v1.1

Do you have a complete modified file/s that you can share?

 

Would appreciate your thoughts, input and results you have just done.

This is something I would like to work on to get going as well.

 

Cheers

George

Share this post


Link to post
Share on other sites

Hi Gareth,

 

How did you go with your tests?

How different are the changes you made to the ipn.php as apposed to:

The contribution --- http://www.oscommerce.com/community/contributions,888

Post --- QTPro v4.6.1 - osC RC2a PayPal Standard integration v1.1

Do you have a complete modified file/s that you can share?

 

Would appreciate your thoughts, input and results you have just done.

This is something I would like to work on to get going as well.

 

Cheers

George

 

Im interested to see if this worked. Surely Im not the only person running Paypal IPN 2.3.x and QTPro...

 

I really dont want to go back to paypal standard, but the volume of orders is starting to pick up now and the lack of stock control is a problem.

 

Cheers,

 

Ed

Share this post


Link to post
Share on other sites

Im interested to see if this worked. Surely Im not the only person running Paypal IPN 2.3.x and QTPro...

 

I really dont want to go back to paypal standard, but the volume of orders is starting to pick up now and the lack of stock control is a problem.

 

Cheers,

 

Ed

 

Update has been added to http://addons.oscommerce.com/info/2679 called Paypal_IPN_2_3_4_7 Fix for QTPro v4.51b and/or Discount Coupon Codes 3.32 dated 26 May 2010

Credit to Gareth for the effort in providing QTpro code, and Luca for Discount coupon fix. Great job.

 

Regards

George

Share this post


Link to post
Share on other sites

Update has been added to http://addons.oscommerce.com/info/2679 called Paypal_IPN_2_3_4_7 Fix for QTPro v4.51b and/or Discount Coupon Codes 3.32 dated 26 May 2010

Credit to Gareth for the effort in providing QTpro code, and Luca for Discount coupon fix. Great job.

 

Regards

George

 

Guys - Thank you so much - been spending ages on this and couldn't crack it.

 

Cheers,

 

Ed

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×