Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Attributes Text Field input cut off in cart

Attributes Text Field input cut off in cart

Locked

Views: 2,483

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
25 Nov 2007, 10:04 PM
#1
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Attributes Text Field input cut off in cart

When a user enters text in the attributes Text Field only the first letter renders in the cart.

I don't know why only the first letter shows???

There must be a scripting issue here but as to why the text field has been affected by the mod is a mystery to me.

Here is what renders:

Specify Sub 1: b

should read beets

Thank you!

25 Nov 2007, 11:43 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

The TEXT Attribute is made from 1 Option Name and NO Option Value ...

When you set them up, they should have the Option Type on the Option Name set to TEXT and when making the Attribute you would select your Option Name and the Option Value for:
TEXT [RESERVED FOR TEXT/FILES ONLY ATTRIBUTES]

Then you will see an input box for these ...

If you prefer a TEXTAREA you can define that by editing the Option Name once it is created ...

25 Nov 2007, 11:58 PM
#3
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Re: Attributes Text Field input cut off in cart

Hi and thanks Ajeh "Queen of Zen Cart" - its actually the checkout confirmation page and orders in admin not showing the text inputed.

The Option Name is Text and has no Option Value

I see the input box in the product page, text renders in the cart but does not parse over to the confirmation page - just the first letter...

Sorry I mis-wrote my first post.

26 Nov 2007, 2:32 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

Have you an URL to this Product where we can test this phenomena out, perhaps? :smile:

26 Nov 2007, 3:05 AM
#5
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Re: Attributes Text Field input cut off in cart

http://www.suburbanorganics.com

Please note - my clients could not get their head around adding attributes in drop-downs for the menu each week - so I had to make a separate sub (text) and weights part - this is crude I know. I trained them and they couldn't hack it.

Let me know - really appreciate this !!

26 Nov 2007, 3:42 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

I cannot test anything as the checkout does not work ...

You have a zone on shipping or something and Free shipping is not available to Ohio or New Jersey ...

26 Nov 2007, 4:07 AM
#7
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Re: Attributes Text Field input cut off in cart

sorry we are still in testing mode and installed zip ship and are currently programming the zip codes in - use the zip code 07840... we will be finished with this tomorrow...

26 Nov 2007, 4:23 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

What happens if you switch to the Classic Template does it correct the output?

26 Nov 2007, 4:29 AM
#9
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Re: Attributes Text Field input cut off in cart

It is in classic mode - I did make a mod to the order.php to include the weights in the orders. When we originally had the drop-drown for the subs it rendered well. Why when we switched to text it cut the word off is beyond me. As the script was modified to include the weight in the admin, email confirmation and the checkout confirmation page. It shouldn't have messed with the text fields...unless there is something to when I added the weights part... shall I send the script?

26 Nov 2007, 4:34 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

I have no idea what changes you made nor their effect ...

I would literally have to sit down with your code to see what you have changed, made errors to, might have bad or corrupt files to etc. to resolve this ...

And, this would not be a simple slam dunk to do so ...

Perhaps someone with time on their hands can help you work through this ... or, you could post in the Commercial Help Wanted ...

NOTE: I would stop now and set that site up properly for the templates and overrides ... otherwise next upgrade, you will lose all customizations and changes ... :eek:

26 Nov 2007, 4:37 AM
#11
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Re: Attributes Text Field input cut off in cart

the tpl_account_history_info.php

<?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?>
<tr>
    <td class="accountQuantityDisplay"><?php echo  $order->products[$i]['qty'] . QUANTITY_SUFFIX; ?></td>
    <td class="accountProductDisplay"><?php echo  $order->products[$i]['name'];

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
  echo '<ul id="orderAttribsList">';
  for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
    echo '<li>' . $order->products[$i]['attributes'][$j]['option'] . TEXT_OPTION_DIVIDER . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . TEXT_OPTION_DIVIDER . $order->products[$i]['attributes'][$j]['weights'] .' ' . lbs . '.' . '</li>';
  }
    echo '</ul>';
}

?>

26 Nov 2007, 4:41 AM
#12
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Re: Attributes Text Field input cut off in cart

order.php with the weights added mod

simple mod

  $subindex = 0;
  $attributes_query = "select products_options_id, products_options_values_id, products_options, products_options_values, products_attributes_weight, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
                           where orders_id = '" . (int)$order_id . "'
                           and orders_products_id = '" . (int)$orders_products->fields['orders_products_id'] . "'";

  $attributes = $db->Execute($attributes_query);
  if ($attributes->RecordCount()) {
    while (!$attributes->EOF) {
      $this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'],
                                                               'value' => $attributes->fields['products_options_values'],
															   'weights' => $attributes->fields['products_attributes_weight'],
                                                               'prefix' => $attributes->fields['price_prefix'],
                                                               'price' => $attributes->fields['options_values_price']);
26 Nov 2007, 4:44 AM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

This is broken when it gets put into the shopping_cart or the checkout_blah or orders class or something beyond that ...

Somewhere along the way you have errors in your code or perhaps even in the database causing these issues ...

It can take from 30 minutes to many hours to discover just what is wrong here and get things cleaned up ...

I am afraid trying to guess through this isn't something that is really easily done on the forum and trying to speculate the cause from being custom code changes or add-ons or a mixture of both ... :cry:

26 Nov 2007, 4:53 AM
#14
fay808 avatar

fay808

New Zenner

Join Date:
Aug 2007
Posts:
35
Plugin Contributions:
0

Re: Attributes Text Field input cut off in cart

I totally understand and I appreciate your looking into this. The mod you helped me with back in September and worked really well with the drop-downs. The above code is the only part we changed -adding the weights to render in the orders. So that said - guess I will have to get the drop-downs back...they make more sense anyway.

You guys are sooo helpful and rock the ecommerce world !

All the best !:smartalec:

28 Nov 2007, 8:00 AM
#15
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

How do I set up text box, which have done successfully, but
FORCE purchaser to enter text, before proceeding to cart?
TIA

28 Nov 2007, 6:08 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes Text Field input cut off in cart

Nifty little switch, eh? :cool: