Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Imprint Text Options


Guest

Recommended Posts

Anyone know if there is a way that I can have the boxes taller to where the customer can have more room to write with more than one line of text?

Example:

 

Here is beginning text

rest of text

 

Currently if I try to hit enter button it actually adds to the cart and goes to shopping cart.php

 

Also wondering how to make the box longer. Currently it appears to only hold 20 text.

Edited by fan4chevy
Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 337
  • Created
  • Last Reply

Top Posters In This Topic

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

Here is the section of my admin/orders.php

 

 

<?php
   for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
     echo '          <tr class="dataTableRow">' . "\n" .
          '            <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
          '            <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];

     if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
       for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
         echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
         if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
         echo '</i></small></nobr>';
       }
     }
// 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']) . "'");
     $pid = tep_db_fetch_array($pid_query);
     $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['products_id'] . " 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	 

Edited by Oggster
Link to comment
Share on other sites

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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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

Hello:

Thanks for the quick reply :). 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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Hello:

Thanks for the quick reply :). 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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

I installed Imprint Text V 1.3.5 and it works fine except for one problem. The text option box only shows up when there are other options with the product. If there are no other standard product option with a drop down menu the text options do not show. I have checked and rechecked the code but can find no errors. Can someone point me in the right direction to fix this?

 

Thanks,

 

Dan

Link to comment
Share on other sites

  • 3 weeks later...

Dear, I am using 2.2Rc2a I installed with care fully (Imprint Text V 1.3.5 : 25 Jan 2010 ) I did not got any error after installation.

 

1. I went to admin area Menu ( Catalog > Text Attributes ) and Insert my text like ( Your Offer: ) It inserted successfully.

2. After it I checked out Box ( Your Offer: ) in New Product area. it is updated successfully. But It is not appeared in product at front end.

3. after it I went to admin area again Menu ( Catalog > Products Attributes ) It have these options

 

ID---- Product Name--- Option Name--- Option Value--- Value Price--- Prefix--- Action

 

no any new thing appeared here it is not working you can say Products Attributes is working as it is before.

 

Plz Help me to run this Imprint Text Option in 2.2Rc2a

Link to comment
Share on other sites

Plz Help me to run this Imprint Text Option in 2.2Rc2a

If you go back into admin now and view the product and the checkbox is checked for the option, then it is in the database correctly. In that case, the problem is most likely on the shop side. You can try using the included product_info.php file for a quick test. If it shows up, then the problem is in that file. If not, it is in the includes/application_top.php file.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...