Nobody?
Latest News: (loading..)
Imprint Text Options
Started by alenkij, Apr 25 2005 10:28 AM
328 replies to this topic
#321
Posted 14 June 2012 - 06:25 PM
#322
Posted 28 June 2012 - 02:36 AM
Has anyone found a solution to use Paypal Payments Standard with the Imprint Text contribution?
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!
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!
Edited by BLTZKRG, 28 June 2012 - 02:38 AM.
#323
Posted 01 November 2012 - 12:46 PM
Is there a working demo of this contribution? Just so I can see how it works and what it looks like before I start diving in and editing files.
#324
Posted 06 November 2012 - 08:24 PM
hi, could somebody helpme please, ive installed the contribution as per the instructions but when customers purchase items with the text attributes the order.php file doesnt show the attributes, the only way i can view what has been written is to log in to phpmyadmin and find it via order_text_attributes, i have checked to see if there is something that ive missed but im lost, and im a bit of a noob with php, pls could some one help!!
#325
Posted 10 November 2012 - 01:55 PM
mrengland79, on 06 November 2012 - 08:24 PM, said:
hi, could somebody helpme please, ive installed the contribution as per the instructions but when customers purchase items with the text attributes the order.php file doesnt show the attributes, the only way i can view what has been written is to log in to phpmyadmin and find it via order_text_attributes, i have checked to see if there is something that ive missed but im lost, and im a bit of a noob with php, pls could some one help!!
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'm in the same boat as: mrengland79.
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.
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
Okay. So I was successful in getting it to email me the order with the text attributes. Here is the code I used around line 246 in my checkout_process.php:
// 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.
// 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
Okay. This code is what worked for me. I used this same code in orders.php, invoice.php and packingslip.php. My text shows in all of them.
// 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
// 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
Hi!
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?
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?









