Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Imprint Text Options


Guest

Recommended Posts

  • Replies 337
  • Created
  • Last Reply

Top Posters In This Topic

Yeah, I need this too! Half my orders aren't being completed because of people not clicking the return to merchant button (if they don't have a paypal account) and becuase of this module, paypal IPN doesn't work! I need these text options and the product attribute module is too cumbersome to use. Anyone? I may have to switch carts if I can't get these two to work!!! Any help would be super appreciated!!!

 

Karen

 

 

I just installed the Imprint contribution to an already heavily modified cart, however--I installed it BEFORE I checked this support forum & discovered that it supposedly doesn't work with Paypal IPN. I also have the Paypal module (V1.3) installed and am wondering if that is the version people are saying doesn't work with this awesome contribution.

By the way, I noticed that there's now a Paypal IPN Version 2.2 (just released last week).

Has anyone tried the new one with success in combination with this mod yet?

 

It's recommended on the download page that everyone update to the newer 2.2 version, but my older one was working okay prior to my installing the Imprint mod. I don't have any products online yet that need text options, so I'd like to know from those who are having problems with this contribution coupled with the Paypal IPN:

 

1) Which Paypal IPN version is being used?

and

2) Are there any issues over and above the text not passing through to Paypal?

 

 

Thanks!

Mary

Link to comment
Share on other sites

  • 3 weeks later...

hi i am useing a theme i payed for.

there for it comes as a edited full install

i then added your text boxes got it installed fine and the boxes show and can be filled in ....

but on buying theres no info anywhere

client email dont get the text fields

order comfirmed mails to me dont have the info

there nothing in the orders invoice or anythink in admin...

 

can you please help me so we get the info that users fill in

 

many many thanks

 

steve

Link to comment
Share on other sites

  • 1 month later...

I figured out how to get the order attributes to show up in the customers account history (account_history_info.php or account_history_info.tpl.php if osCMax), add the // denuz section as shown below, or if using a different contribution, trial and error should work. The contribution has an update for the admin/orders.php which works fine, but you can't just cut and paste it, because in orders.php the order number is referenced with $HTTP_GET_VARS['oID'], and account_history_info is using $HTTP_GET_VARS['order_id'] .

 

The other problem is the whole, "I installed this and later found out you can't add two of the same product with different information in the text fields." This seems to be fatal flaw in the contrib, not that it can't be solved. It appears that when you add a product with a text field, the text input goes into a new table and is referenced to the item number by using the customers unique session id number. Unfortunately, this only works for one product per customer session. If you look at application_top.php, you find the whole tragedy of it all:

 

tep_db_query("delete from customers_basket_text_attributes where products_id = " . tep_get_prid($HTTP_POST_VARS['products_id'][$i]) . " and session_id = '" . $osCsid . "'");

 

Since the contrib was designed to hold the text attributes based on the customers session id, if the customer goes back to the product (meaning they're still inside of the same session, therefore having the same session id), the contrib, by nature has to delete the text attributes fields for that product and session id before it can fill the field again. If I have time, I'll look into rewriting this so it stores the attributes somewhere else temporarily for items added to the cart, or something else maybe. Otherwise, don't bother messing with it thinking you'll get it to add more than one of the same product to the cart with different text fields - it won't work, and there's no "fix" for it aside from adding a hefty chunk of code and a table or so into it.

 

Here's the code for account_history_info.php:

 

if ( (isset($order->products[$i]['textattributes'])) && (sizeof($order->products[$i]['textattributes']) >0) ) {

for ($j=0, $n2=sizeof($order->products[$i]['textattributes']); $j<$n2; $j++) {

echo '<br><nobr><small> <i> - ' . $order->products[$i]['textattributes'][$j]['name'] . ': ' . $order->products[$i]['textattributes'][$j]['text'] . '</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");

$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['order_id'] . " 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

echo '</td>' . "\n";

Link to comment
Share on other sites

  • 4 weeks later...

I've installed everything correctly, I thought, but once i've inputed the text and gone to continue(when testing) a blank screen with this is returned:

 

1054 - Unknown column 'products_id' in 'where clause'

 

delete from customers_basket_text_attributes where products_id = 28 and session_id = 'ffb287efd779c032fa7cf7c909efcdeb'

 

[TEP STOP]

 

 

Where have I gone wrong? Is it my database? When the instructions on the database say to set the default '' does that mean leave default blank?

 

Thanks for any help.

 

Amped

Link to comment
Share on other sites

I figured out how to get the order attributes to show up in the customers account history (account_history_info.php or account_history_info.tpl.php if osCMax), add the // denuz section as shown below, or if using a different contribution, trial and error should work. The contribution has an update for the admin/orders.php which works fine, but you can't just cut and paste it, because in orders.php the order number is referenced with $HTTP_GET_VARS['oID'], and account_history_info is using $HTTP_GET_VARS['order_id'] .

 

The other problem is the whole, "I installed this and later found out you can't add two of the same product with different information in the text fields." This seems to be fatal flaw in the contrib, not that it can't be solved. It appears that when you add a product with a text field, the text input goes into a new table and is referenced to the item number by using the customers unique session id number. Unfortunately, this only works for one product per customer session. If you look at application_top.php, you find the whole tragedy of it all:

 

tep_db_query("delete from customers_basket_text_attributes where products_id = " . tep_get_prid($HTTP_POST_VARS['products_id'][$i]) . " and session_id = '" . $osCsid . "'");

 

Since the contrib was designed to hold the text attributes based on the customers session id, if the customer goes back to the product (meaning they're still inside of the same session, therefore having the same session id), the contrib, by nature has to delete the text attributes fields for that product and session id before it can fill the field again. If I have time, I'll look into rewriting this so it stores the attributes somewhere else temporarily for items added to the cart, or something else maybe. Otherwise, don't bother messing with it thinking you'll get it to add more than one of the same product to the cart with different text fields - it won't work, and there's no "fix" for it aside from adding a hefty chunk of code and a table or so into it.

 

Here's the code for account_history_info.php:

 

if ( (isset($order->products[$i]['textattributes'])) && (sizeof($order->products[$i]['textattributes']) >0) ) {

for ($j=0, $n2=sizeof($order->products[$i]['textattributes']); $j<$n2; $j++) {

echo '<br><nobr><small> <i> - ' . $order->products[$i]['textattributes'][$j]['name'] . ': ' . $order->products[$i]['textattributes'][$j]['text'] . '</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");

$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['order_id'] . " 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

echo '</td>' . "\n";

 

This did not work in my case. The order shows -; where the text options should be. I copy & pasted the code in your post so I'm pretty sure I didn't have any typos. Any ideas on what to check?

 

Thanks in advance.

Link to comment
Share on other sites

  • 1 month later...

I have written two contribs that will allow your customer to add the same product to their cart with different text names. Its a quick easy fix and it works. This program should be re-written to do a better job at this, but this fix will allow you to do the same thing.

 

Another contrib that I wrote allows you to charge a fee per text field per product. It works with the above contrib in which it if the customer has 2 or more of the same product and has custom text per product (same product but more qty then 1) it will calc the fee per qty value.

 

This contrib has two options you can install with. Either the above method which works with the first contrib I mentioned or another method if you do not wish to use the more then one text entry per product.

 

I will write up directions today for all of you.

Link to comment
Share on other sites

I have written two contribs that will allow your customer to add the same product to their cart with different text names. Its a quick easy fix and it works. This program should be re-written to do a better job at this, but this fix will allow you to do the same thing.

 

Another contrib that I wrote allows you to charge a fee per text field per product. It works with the above contrib in which it if the customer has 2 or more of the same product and has custom text per product (same product but more qty then 1) it will calc the fee per qty value.

 

This contrib has two options you can install with. Either the above method which works with the first contrib I mentioned or another method if you do not wish to use the more then one text entry per product.

 

I will write up directions today for all of you.

 

Well I uploaded the two contribs under the contrib section of this thing. Looks like we dont have a author anymore, so we have to do the work our selfs. Good contrib though, now even better. Enjoy.

Link to comment
Share on other sites

Thanks to the orginator for this contribution and to the people who have kept it going. Hopefully, somebody can help me with this.

 

How do I change the titles of the input fields to something other than Name and Date?

How do I add additional fields and resize them??

Central50, if I remove the code for the checkboxes on the product_info.php page will the customized text still get passed on when the order is placed?

 

Thanks!

Edited by mindworx365
Link to comment
Share on other sites

You know, I just realized that this script supposedly adds more then one field if need (i.e name, date)

 

The one that I wrote will not to such an option, so hold off as I need to rewrite this to do so.

 

The one I wrote only supports one text field (name) so let me rewrite it, take the check box out, and release. Sound good?

Link to comment
Share on other sites

Okay everyone, I rewrote the code today. I am going to publish it in a package on the contrib page. I urge everyone (as will be noted on contrib page) to use this new contrib.

 

For my purposes, I only needed 1 text option per product (name). But yesterday I realized that my mod only allows that. So if you installed it, and you used more then one text per name (name, color) it would not work.

 

So I re-wrote it, shortened up some of the queries, etc. I would like to clean up the code a little more, but for now it works and I wanted people to download the new one not the old one before I went on vacation.

 

I also took out the check box option. Again, after realizing the people have more then one text option on a product page, it would look redundant. Now the system will recognize if there is text entered into that specific field or not. It will then run the rest of the system accordingly.

 

Please note for the other contrib, the charge per custom field contrib I wrote, that will be updated as well. You should note this:

 

 

You have a product page with two fields on it: Name, Color

 

----A customer buys that product with both fields filled out.

 

The system will charge that customer for 1 Custom entry. Not two. Charging for every entry in one qty would not make sense.

 

Same goes for if the custom adds two of those products to their shopping cart, the first one has only the Name field entered and the second one has the Color field entered. The system will charge them for two customizations.

 

Understand? I want to make that as simple as possible.

 

It would not make sense if you had color, name, age, size, etc. on each product page and charged for each one. If you want to do that, let me know, and I will see if I have time to rewrite the code to do so.

 

Other wise, like I said:

 

 

 

1. Customer buys product (1 qty) with two fields(name,color) filled out.

---System charges the customer for one customization.

 

OR

 

2. Customer buys more then 1 product (xx qty) and fills out the two fields(name,color) for each qty differently - Example:

 

 

product = bottle

 

 

Name | color

 

Jon | blue

 

mind | (blank)

 

over | (blank)

 

(blank | matter

 

 

Now thats the qty of 5 for the same product (bottle). The system will charge them for 5 customs. Not 10, that would not be right.

 

Okay, I will release the new contribs a little later.

Edited by central50
Link to comment
Share on other sites

Woops my example at the bottom was wrong:

 

Okay everyone, I rewrote the code today. I am going to publish it in a package on the contrib page. I urge everyone (as will be noted on contrib page) to use this new contrib.

 

For my purposes, I only needed 1 text option per product (name). But yesterday I realized that my mod only allows that. So if you installed it, and you used more then one text per name (name, color) it would not work.

 

So I re-wrote it, shortened up some of the queries, etc. I would like to clean up the code a little more, but for now it works and I wanted people to download the new one not the old one before I went on vacation.

 

I also took out the check box option. Again, after realizing the people have more then one text option on a product page, it would look redundant. Now the system will recognize if there is text entered into that specific field or not. It will then run the rest of the system accordingly.

 

Please note for the other contrib, the charge per custom field contrib I wrote, that will be updated as well. You should note this:

 

 

You have a product page with two fields on it: Name, Color

 

----A customer buys that product with both fields filled out.

 

The system will charge that customer for 1 Custom entry. Not two. Charging for every entry in one qty would not make sense.

 

Same goes for if the custom adds two of those products to their shopping cart, the first one has only the Name field entered and the second one has the Color field entered. The system will charge them for two customizations.

 

Understand? I want to make that as simple as possible.

 

It would not make sense if you had color, name, age, size, etc. on each product page and charged for each one. If you want to do that, let me know, and I will see if I have time to rewrite the code to do so.

 

Other wise, like I said:

 

 

 

1. Customer buys product (1 qty) with two fields(name,color) filled out.

---System charges the customer for one customization.

 

OR

 

2. Customer buys more then 1 of the same product (xx qty) and fills out the two fields(name,color) for each qty differently - Example:

 

 

product = bottle

 

 

Name | color (fields)

 

Jon | blue

 

mind | (blank)

 

over | (blank)

 

(blank | matter

 

 

Now thats the qty of 4 for the same product (bottle). The system will charge them for 4 customs. Not 8, that would not be right.

 

And so on for every other product in their shopping cart.

 

Okay, I will release the new contribs a little later.

Link to comment
Share on other sites

Jon,

 

If I remove the check boxes from the product_info page will the custom text still work?

 

Wait a couple of minutes then use my updated contrib. It has the checkboxes taken out.

 

If you took out the checkbox out right now, it would not work. The new update there is no checkboxes.

Link to comment
Share on other sites

Also, FYI- The updated Charge per customization that I will release now gets taxed with the rest of the products. The previous version did not, it would just add the charge after tax. Now tax gets computed into the order.

Link to comment
Share on other sites

Okay everyone, I just published the new mods. No more checkboxs, and it computes with tax, amongst a number of other large things discussed above. Any problems, let me know. Enjoy.

-Jon

Link to comment
Share on other sites

Okay everyone, I just published the new mods. No more checkboxs, and it computes with tax, amongst a number of other large things discussed above. Any problems, let me know. Enjoy.

-Jon

 

central50... I installed the version 1.3.1 of the contribution with MOREENTRIES and CHARGING enhancements. Everything seems to be working fine except for two things:

 

1. If the same customer goes back to the same item and enter a new imprint information in a text box, I get the duplicate entry database error. Do you think we have to have the primary key defined (on product_id) for the qty table?

 

2. I added the code in the charging enhancement to the catalog/includes/classes/order.php, but it never shows up in the hopping cart and as well as in the checkout process. What might I have done wrong?

 

Response is appreciated.

Mardi

Link to comment
Share on other sites

Did you install the latest package I released? Yes, the products_id for the qty table needs to be defined as the primary key.

 

Can you show me what the full error message states?

 

As far as the charging enhancement goes, the code was designed to show in the checkout process. It does not show up identified to the customer, but rather in the price itself. When you got to the checkout process, did you calc the different between if the product was bought without a text option, and then when it was bought with one custom field?

-Jon

Link to comment
Share on other sites

Did you install the latest package I released? Yes, the products_id for the qty table needs to be defined as the primary key.

 

Can you show me what the full error message states?

 

As far as the charging enhancement goes, the code was designed to show in the checkout process. It does not show up identified to the customer, but rather in the price itself. When you got to the checkout process, did you calc the different between if the product was bought without a text option, and then when it was bought with one custom field?

-Jon

 

Can you please tell me if your code is added to the correct spot in order.php? The code is below:

 

 

 

$shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty'];

$this->info['subtotal'] += $shown_price;

 

//CENTRAL50 CHARGE PER CUSTOM

$check_query = tep_db_query("select products_id, customqty from customers_basket_text_attributes_qty where session_id = '" . $osCsid . "' and products_id = '" . $this->products[$index]['id'] . "'"); //also text option

$check = tep_db_fetch_array($check_query);

if ($check['customqty'] > 0) {

$charge = $check['customqty'] * 20; //Change value to whatever you want to charge per custom

 

$shown_price = $shown_price + $charge;

$this->info['subtotal'] += $charge;

}

//CENTRAL50 CHARGE PER CUSTOM

 

$products_tax = $this->products[$index]['tax'];

$products_tax_description = $this->products[$index]['tax_description'];

if (DISPLAY_PRICE_WITH_TAX == 'true') {

Link to comment
Share on other sites

Yes thats the correct spot. But as with the problem that you are having the Customized fields, that has to be working for the charge to work. Is the qty field being updated when you add a customized product?

Link to comment
Share on other sites

Yes thats the correct spot. But as with the problem that you are having the Customized fields, that has to be working for the charge to work. Is the qty field being updated when you add a customized product?

 

 

 

yes. customqty=1

 

in the other table: products_text_attributes_id = 3 (I deleted the name and color, and added a new field). I don't know if it has to do with anything...

 

I don't tknow why it is not multiplying 1 with $20 (in my case) and add that to the total???

 

Thanks for your help.

Mardi

Link to comment
Share on other sites

yes. customqty=1

 

in the other table: products_text_attributes_id = 3 (I deleted the name and color, and added a new field). I don't know if it has to do with anything...

 

I don't tknow why it is not multiplying 1 with $20 (in my case) and add that to the total???

 

Thanks for your help.

Mardi

 

 

I think I found the probelm, but not the solution. The program flow does not get into the if block. I put the addition operations outside of teh block, and it took it and showed it on checkout page. Also, I just put 1 for the if condition, again, it was fine. But I don't know how we can get it to enter the if block...

 

I don't know what is wrong with ---- if ($check['customqty'] > 0) {

 

Thanks for the help.

Mardi

Link to comment
Share on other sites

I think I found the probelm, but not the solution. The program flow does not get into the if block. I put the addition operations outside of teh block, and it took it and showed it on checkout page. Also, I just put 1 for the if condition, again, it was fine. But I don't know how we can get it to enter the if block...

 

I don't know what is wrong with ---- if ($check['customqty'] > 0) {

 

Thanks for the help.

Mardi

 

 

Although customqty = 1, $check['cutomqty'] is 0 for whatever reason, and that's why it is not getting into the if block.

 

Mardi

Link to comment
Share on other sites

Although customqty = 1, $check['cutomqty'] is 0 for whatever reason, and that's why it is not getting into the if block.

 

Mardi

 

 

Hi

 

I fixed it. I found out that there was a problem with the $osCsid in the query. I put the actual session ID from the database and it worked. SO as a solution, I wrapped $osCsid with tep_session_id(). and voila....

 

Do you think that we have to wrap other $osCsid's in your code? like in application_top.php, etc???

 

Thanks for the help.

Mardi

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