sijo, on 13 March 2010 - 10:40 PM, said:
In my case there is nothing written to the database, and I have looked over the code several times now. I think I have found something that maybe causes this. Please correct me if I'm wrong:
In my checkout_confirmation.php I have this piece of code:
In my case a customer is sent to paypal_standard.php and NOT checkout_process.php
Since the code for denuz - Imprint for writing to the database is in checkout_process.php then nothing is written to the database.
My question is:
Can I implement the two pieces of Imprint code in checkout_process.php into paypal_standard.php ?
This is where I have implemented the code in paypal_standard.php, but not activated it:
First piece:
Second piece:
And this litle change:
Any help on this would be appreciated..
In my checkout_confirmation.php I have this piece of code:
if (isset($$payment->form_action_url)) {
$form_action_url = $$payment->form_action_url;
} else {
$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
}
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
What I understand from this is that if I pay with Paypal then the first $form_action_url is used. If I dont use a payment form then checkout_process.php is executed. Am I right so far?In my case a customer is sent to paypal_standard.php and NOT checkout_process.php
Since the code for denuz - Imprint for writing to the database is in checkout_process.php then nothing is written to the database.
My question is:
Can I implement the two pieces of Imprint code in checkout_process.php into paypal_standard.php ?
This is where I have implemented the code in paypal_standard.php, but not activated it:
First piece:
tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
$order_products_id = tep_db_insert_id();
// denuz text attr
/*
$attr_q = tep_db_query("select * from customers_basket_text_attributes where session_id = '$osCsid' and products_id = " . tep_get_prid($order->products[$i]['id']));
while ($attr = tep_db_fetch_array($attr_q)) {
tep_db_query("insert into orders_text_attributes values ($insert_id, " . tep_get_prid($order->products[$i]['id']) . ", " . $attr['products_text_attributes_id'] . ", '" . $attr['products_text_attributes_text'] . "')");
}
tep_db_query("delete from customers_basket_text_attributes where products_id = " . tep_get_prid($order->products[$i]['id']) . " and session_id = '" . $osCsid . "'");
*/
// eof denuz text attr
$attributes_exist = '0';
if (isset($order->products[$i]['attributes'])) {
Second piece:
$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
}
}
// denuz_arun text attr
/*
$pid_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_model LIKE '" . tep_db_input($order->products[$i]['model']) . "'");
$pid = tep_db_fetch_array($pid_query);
$denux_arunQry = "select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $insert_id.
//$HTTP_GET_VARS['oID'] .
" and ota.products_id = " . $pid['products_id'] . " and pta.products_text_attributes_id = ota.products_text_attributes_id";
//echo ;
$attr_q = tep_db_query($denux_arunQry);
$denux_arun_ ='';
while ($attr = tep_db_fetch_array($attr_q)) {
$denux_arun_ .= $attr['products_text_attributes_name'] . ': ' . stripslashes($attr['products_text_attributes_text'])."\n";
}
*/
// eof denuz_arun text attr
//------insert customer choosen option eof ----
$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
And this litle change:
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
// denuz :
//$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n". $denux_arun_ . "\n";
Any help on this would be appreciated..
If Paypal Payments Standard module is used then there are no text attributes written to the database on completion of an order. This is because instead of the Checkout_process.php being called at the end of a checkout, paypal_standard.php is used which does not have any code from this contribution in it.
I have not been able to successfully take the snippets of code from Checkout_Process.php and insert them into the paypal_standard.php file without receiving a MySql syntax error.
http://www.oscommerce.com/community/contributions,160/category,all/search,attributes
Could anyone assist with trying get this contribution to work in the same way as the "Option Type Feature" is used with Paypal Payments Standard?
Any assistance would be greatly appreciated!



Find content
Not Telling
