Imprint Text Options
#321
Posted 14 June 2012 - 06:25 PM
#322
Posted 28 June 2012 - 02:36 AM
sijo, on 13 March 2010 - 10:40 PM, said:
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!
Edited by BLTZKRG, 28 June 2012 - 02:38 AM.
#323
Posted 01 November 2012 - 12:46 PM
#324
Posted 06 November 2012 - 08:24 PM
#325
Posted 10 November 2012 - 01:55 PM
mrengland79, on 06 November 2012 - 08:24 PM, said:
ok well ive sorted that(please dont ask how i have tinkerd and changed that many files im surprized the site still works) but can someone tell me how to get the text attributes to show on the order process email????
Edited by mrengland79, 10 November 2012 - 01:56 PM.
#326
Posted 26 December 2012 - 04:08 PM
I have almost everything working with this addon. I am using OSC 2.3.3 and I also can't get the text attributes to come through in the order email, or the invoice. Any suggestions would be helpful. Thanks.
#327
Posted 26 December 2012 - 05:11 PM
// denuz_arun text attr
$pid = @mysql_result(tep_db_query("select products_id from products_description where products_name='" . tep_db_input($order->products[$i]['name']) . "'"), 0, "products_id");
$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 . " 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 ----
$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";
}
Although next, I have to work on the orders.php and the invoice.php and get the text attribute to show there. If anyone has done this successfully, please send me your code. Thanks.
#328
Posted 26 December 2012 - 05:26 PM
// denuz text attr
$pid = @mysql_result(tep_db_query("select products_id from products_description where products_name='" . tep_db_input($order->products[$i]['name']) . "'"), 0, "products_id");
$attr_q = tep_db_query("select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = " . $HTTP_GET_VARS['oID'] . " and ota.products_id = " . $pid . " and pta.products_text_attributes_id = ota.products_text_attributes_id");
while ($attr = tep_db_fetch_array($attr_q)) {
echo '<br><nobr><small> <i> - ' . $attr['products_text_attributes_name'] . ': ' . stripslashes($attr['products_text_attributes_text']);
echo '</i></small></nobr>';
}
// eof denuz text attr
#329
Posted 25 January 2013 - 02:11 PM
Can anyone tell me how I can get this add-onn to work with more than 1 language?
I am assuming that I would have to make some changes to the catalog/admin/text_attributes.php...?? Any idea what those changes should be?
#330
Posted 16 June 2013 - 05:51 PM
#331
Posted 17 June 2013 - 02:10 PM
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking









