Oggster, on 08 March 2010 - 08:37 PM, said:
Having an issue with the text attributes not showing in Admin / Orders... Can you take a look and see what the heck I'm doing wrong..
Data is in the database.. Also not showing on the invoice..
Posted 09 March 2010 - 12:28 AM
Oggster, on 08 March 2010 - 08:37 PM, said:
Posted 09 March 2010 - 10:07 PM
Jack_mcs, on 09 March 2010 - 12:28 AM, said:
Edited by Oggster, 09 March 2010 - 10:11 PM.
Posted 09 March 2010 - 11:16 PM
I Hate PHP, LoLssss
Visit My Site, Any constructive comments and suggestions Welcome :)Posted 09 March 2010 - 11:57 PM
Oggster, on 09 March 2010 - 10:07 PM, said:
Posted 09 March 2010 - 11:58 PM
seshalyn_pr, on 09 March 2010 - 11:16 PM, said:
Posted 10 March 2010 - 12:18 AM
Jack_mcs, on 09 March 2010 - 11:57 PM, said:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and pta.products_text_attributes_id = ota.products_text_attributes_id' at line 1 select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = 8551 and ota.products_id = and pta.products_text_attributes_id = ota.products_text_attributes_id [TEP STOP]
Posted 10 March 2010 - 12:38 AM
Jack_mcs, on 09 March 2010 - 11:58 PM, said:
I Hate PHP, LoLssss
Visit My Site, Any constructive comments and suggestions Welcome :)Posted 10 March 2010 - 12:46 AM
Oggster, on 10 March 2010 - 12:18 AM, said:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and pta.products_text_attributes_id = ota.products_text_attributes_id' at line 1 select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = 8551 and ota.products_id = and pta.products_text_attributes_id = ota.products_text_attributes_id [TEP STOP]
Open admin/invoice.php and find the following:
// 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"); $pid_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_model LIKE '" . tep_db_input($order->products[$i]['model']) . "'");
Replace with:
// $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"); $pid_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_name = '" . tep_db_input($order->products[$i]['name']) . "'");
Open admin/packingslip.php and find the following:
// denuz text attr $pid_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_model LIKE '" . tep_db_input($order->products[$i]['model']) . "'");
Replace with:
// denuz text attr $pid_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_name = '" . tep_db_input($order->products[$i]['name']) . "'");
Posted 10 March 2010 - 01:14 AM
Posted 10 March 2010 - 02:07 AM
seshalyn_pr, on 10 March 2010 - 12:38 AM, said:
Posted 10 March 2010 - 02:08 AM
Oggster, on 10 March 2010 - 01:14 AM, said:
Posted 10 March 2010 - 03:11 AM
Jack_mcs, on 10 March 2010 - 02:08 AM, said:
Posted 10 March 2010 - 03:17 AM
Oggster, on 10 March 2010 - 03:11 AM, said:
Posted 10 March 2010 - 03:32 AM
Jack_mcs, on 10 March 2010 - 02:07 AM, said:
I Hate PHP, LoLssss
Visit My Site, Any constructive comments and suggestions Welcome :)Posted 12 March 2010 - 12:52 AM
Jack_mcs, on 09 March 2010 - 12:28 AM, said:
Posted 12 March 2010 - 11:40 AM
Jack_mcs, on 09 March 2010 - 12:28 AM, said:
Posted 12 March 2010 - 04:29 PM
sijo, on 12 March 2010 - 12:52 AM, said:
Posted 12 March 2010 - 05:11 PM
Oggster, on 12 March 2010 - 04:29 PM, said:
Posted 13 March 2010 - 10:40 PM
Jack_mcs, on 09 March 2010 - 12:28 AM, said:
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? 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'])) {
$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'];
$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";
Edited by sijo, 13 March 2010 - 10:44 PM.
Posted 22 March 2010 - 01:59 AM