Jump to content



Photo
- - - - -

Imprint Text Options


  • Please log in to reply
331 replies to this topic

#261 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,469 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 09 March 2010 - 00:28

Hey Jack
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..

If the data is in the database, then there must be a mistake in the code changes for the orders page. An edited file is in the contribution. Use it to verify the attributes show up. If they do, then use a compare program to find the problem.

#262   Oggster

Oggster
  • Members
  • 101 posts
  • Real Name:Jay
  • Gender:Male

Posted 09 March 2010 - 22:07

If the data is in the database, then there must be a mistake in the code changes for the orders page. An edited file is in the contribution. Use it to verify the attributes show up. If they do, then use a compare program to find the problem.


I even uplaoded the orders.php file in the contribution to test.. and it would not work either.. I am runing MS2...
Would love to get this working.. I know I'm 90% there..

THanks for your help..

Edited by Oggster, 09 March 2010 - 22:11.


#263   seshalyn_pr

seshalyn_pr
  • Members
  • 72 posts
  • Real Name:Glenda
  • Gender:Female

Posted 09 March 2010 - 23:16

Hello:

I've been working all day on installing this contribution. I'm not getting any error messages, but the contribution is simply not working. I see the text attributes in my admin, and in the product editing the fields for it appear. On the other hand, I am not getting the price field for the product, and it changes it to 0.00, and when I choose a text attribute option, it does not show up on the product either.

I have triple checked my work. Used winmerge to compare the files before and after. I ran the Sql, I just don't know what could possibly be wrong. You can see a product after I installed the contribution, and edited it Click Here. Please Help!!! I really need something like this on my shop. Thanks So Much!!!

I Hate PHP, LoLssss

Visit My Site, Any constructive comments and suggestions Welcome :)
WARNING: IT'S STILL UNDER CONSTRUCTION, LOLS

#264 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,469 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 09 March 2010 - 23:57

I even uplaoded the orders.php file in the contribution to test.. and it would not work either.. I am runing MS2...
Would love to get this working.. I know I'm 90% there..

THanks for your help..

The code is using the model number to load the items in admin. Perhaps your products don't have model numbers.

#265 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,469 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 09 March 2010 - 23:58

I have triple checked my work. Used winmerge to compare the files before and after. I ran the Sql, I just don't know what could possibly be wrong. You can see a product after I installed the contribution, and edited it

What happens when you try to use the included files to test with?

#266   Oggster

Oggster
  • Members
  • 101 posts
  • Real Name:Jay
  • Gender:Male

Posted 10 March 2010 - 00:18

The code is using the model number to load the items in admin. Perhaps your products don't have model numbers.


Ok fixed the product model numbers.. You were right I didn't really use them... Well, they all have them now...

Now I get this error on the orders.php page...

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]


#267   seshalyn_pr

seshalyn_pr
  • Members
  • 72 posts
  • Real Name:Glenda
  • Gender:Female

Posted 10 March 2010 - 00:38

What happens when you try to use the included files to test with?

Hello:
Thanks for the quick reply /smile.gif' class='bbc_emoticon' alt=':)' />. When I used the included files, I got this message:

TABLE_ADMINISTRATORS' doesn't exist

select id from TABLE_ADMINISTRATORS limit 1

So then I did it manually.

I have some security add ons, could this intefere at all?
Thanks

I Hate PHP, LoLssss

Visit My Site, Any constructive comments and suggestions Welcome :)
WARNING: IT'S STILL UNDER CONSTRUCTION, LOLS

#268   Oggster

Oggster
  • Members
  • 101 posts
  • Real Name:Jay
  • Gender:Male

Posted 10 March 2010 - 00:46

Ok fixed the product model numbers.. You were right I didn't really use them... Well, they all have them now...

Now I get this error on the orders.php page...

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]


Error Fixed by doing the following..

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']) . "'");


#269   Oggster

Oggster
  • Members
  • 101 posts
  • Real Name:Jay
  • Gender:Male

Posted 10 March 2010 - 01:14

Am I correct in saying that I can only use -1- text field option per product ???

#270 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,469 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 10 March 2010 - 02:07

Hello:
Thanks for the quick reply /smile.gif' class='bbc_emoticon' alt=':)' />. When I used the included files, I got this message:

TABLE_ADMINISTRATORS' doesn't exist

select id from TABLE_ADMINISTRATORS limit 1

So then I did it manually.

I have some security add ons, could this intefere at all?
Thanks

TABLE_ADMINISTRATORS is for an RC2 shop so there is a compatibility issue between your version and the version of the files in the contribution which means you can't use the files directly. I'm not aware of any issues with the contribution and the various versions of oscommerce but I suppose there could be. I think it more likely there is some mistake in the installation. But either way, I on't know what else to suggest to you to find your problem. I suppose, if you can do it, you could install a new shop in a subdirectory and install the contribution into it. If it works, then you can compare your files to find the problem.

#271 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,469 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 10 March 2010 - 02:08

Am I correct in saying that I can only use -1- text field option per product ???

No, there's no limit.

#272   Oggster

Oggster
  • Members
  • 101 posts
  • Real Name:Jay
  • Gender:Male

Posted 10 March 2010 - 03:11

No, there's no limit.


When I ran a test order. I added a product with the text option to the shopping cart.. When I try to add a second different product with the text option.. The text field is filed out with the other products attribute..
So 2 products cannot be added to the cart with text options.. Unless both those products had there own assigned text attribute..

I hope this is making sense.. If this is the only issue I can work with it.. Just wanted to make sure its working right...
Thanks..

#273 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,469 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 10 March 2010 - 03:17

When I ran a test order. I added a product with the text option to the shopping cart.. When I try to add a second different product with the text option.. The text field is filed out with the other products attribute..
So 2 products cannot be added to the cart with text options.. Unless both those products had there own assigned text attribute..

Oh, I see. I misunderstood what you meant. Yes, that is a known problem with this contribution. The work-around is to add extra options on the page so the customer can fill in more options at one time. The code will remember the previous setting so if the customer adds some text then goes back to add another, the first should still be there and they can just type in another box to add another. It is not the best of methods but until the code is fixed, it is the only one.

#274   seshalyn_pr

seshalyn_pr
  • Members
  • 72 posts
  • Real Name:Glenda
  • Gender:Female

Posted 10 March 2010 - 03:32

TABLE_ADMINISTRATORS is for an RC2 shop so there is a compatibility issue between your version and the version of the files in the contribution which means you can't use the files directly. I'm not aware of any issues with the contribution and the various versions of oscommerce but I suppose there could be. I think it more likely there is some mistake in the installation. But either way, I on't know what else to suggest to you to find your problem. I suppose, if you can do it, you could install a new shop in a subdirectory and install the contribution into it. If it works, then you can compare your files to find the problem.

Hey Jack:

I will try that, and see how it goes. I really appreciate your help. Thanks.
Glenda

I Hate PHP, LoLssss

Visit My Site, Any constructive comments and suggestions Welcome :)
WARNING: IT'S STILL UNDER CONSTRUCTION, LOLS

#275   sijo

sijo
  • Members
  • 268 posts
  • Real Name:Stein Ivar Johnsen
  • Gender:Male
  • Location:Norway

Posted 12 March 2010 - 00:52

If the data is in the database, then there must be a mistake in the code changes for the orders page. An edited file is in the contribution. Use it to verify the attributes show up. If they do, then use a compare program to find the problem.


I have the same problem, and I have compared all files.
ITO is working fine, but not showing attribs in admin area for orders, invoice and packing slip.
---------------
regards
sijo
---------------

Contrib: JMrating10 - Rate your products  /  osCommerce VTS - Virus & Threat Scanner

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

#276   sijo

sijo
  • Members
  • 268 posts
  • Real Name:Stein Ivar Johnsen
  • Gender:Male
  • Location:Norway

Posted 12 March 2010 - 11:40

If the data is in the database, then there must be a mistake in the code changes for the orders page. An edited file is in the contribution. Use it to verify the attributes show up. If they do, then use a compare program to find the problem.


I have tested here and this is what I've found:
While doing a test order and reaching checkout_confirmation.php then osCommerce is writing
its product attribs to the database. (Not ITO made attribs)
ITO is writing its attribs to the database when reaching checkout_process.php ? This I cant test because
I have to go through the whole Paypal payment process before checkout_process.php is executed and ITO attribs
are written to the database?

Am I right on this or...?
---------------
regards
sijo
---------------

Contrib: JMrating10 - Rate your products  /  osCommerce VTS - Virus & Threat Scanner

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

#277   Oggster

Oggster
  • Members
  • 101 posts
  • Real Name:Jay
  • Gender:Male

Posted 12 March 2010 - 16:29

I have the same problem, and I have compared all files.
ITO is working fine, but not showing attribs in admin area for orders, invoice and packing slip.


Do you have model numbers for all products?? That was my problem when my site was doing the same thing... Added model numbers for all and fixed everything..

#278   sijo

sijo
  • Members
  • 268 posts
  • Real Name:Stein Ivar Johnsen
  • Gender:Male
  • Location:Norway

Posted 12 March 2010 - 17:11

Do you have model numbers for all products?? That was my problem when my site was doing the same thing... Added model numbers for all and fixed everything..



Yes I have...
---------------
regards
sijo
---------------

Contrib: JMrating10 - Rate your products  /  osCommerce VTS - Virus & Threat Scanner

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

#279   sijo

sijo
  • Members
  • 268 posts
  • Real Name:Stein Ivar Johnsen
  • Gender:Male
  • Location:Norway

Posted 13 March 2010 - 22:40

If the data is in the database, then there must be a mistake in the code changes for the orders page. An edited file is in the contribution. Use it to verify the attributes show up. If they do, then use a compare program to find the problem.


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:
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..

Edited by sijo, 13 March 2010 - 22:44.

---------------
regards
sijo
---------------

Contrib: JMrating10 - Rate your products  /  osCommerce VTS - Virus & Threat Scanner

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

#280   carie

carie
  • Members
  • 70 posts
  • Real Name:carie

Posted 22 March 2010 - 01:59

has anyone used this with sppc.

carie