[SOLVED] nbsp characters in order_items table

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
caciavar
Forum Members
Forum Members
Posts: 64
Joined: Wed Feb 11, 2009 6:30 pm
Location: Toronto, Canada

[SOLVED] nbsp characters in order_items table

Post by caciavar »

I'm using Products / Orders / Cart / Paypal Gateway

When a product is added to the cart and passed to the orders moudule for order creation, an "order" gets created.

When looking at the cms_module_orders_items table, the product_name colum contains an   character at the end of the product name, as well as between the product name and product attributes. Has anyone ever encountered this? Could this be a bug?
The problem is that when the order gets passed to paypal, these characters sometimes show up as squares or diamonds with question marks inside.

I've set UTF-8 encoding everywhere, so it's not an encoding issue.
The cms_module_products table does include these characters, it happens when the row is inserted into the orders_items table.

CMS Version
1.9.3

PaypalGateway
2.3.2

Orders
1.11.2

Cart
1.7.5

Products
2.10.3
Last edited by caciavar on Tue Mar 22, 2011 4:57 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: nbsp characters in order_items table

Post by Dr.CSS »

Have you looked at the template that produces that part of the system?...
caciavar
Forum Members
Forum Members
Posts: 64
Joined: Wed Feb 11, 2009 6:30 pm
Location: Toronto, Canada

Re: nbsp characters in order_items table

Post by caciavar »

Thanks for the fast reply.

I've looked at all the templates in each of these modules and as far as I can tell, there is no template that controls the data that is inserted into the modules_orders_items table.
caciavar
Forum Members
Forum Members
Posts: 64
Joined: Wed Feb 11, 2009 6:30 pm
Location: Toronto, Canada

Re: nbsp characters in order_items table

Post by caciavar »

Actually, I can see this on the confirm order checkout page as well, but it is not controlled by the template:

This is the code generated. Notice the   after the product description "test 1234 1234":

Code: Select all

  <fieldset>
  <legend><strong>Items</strong></legend>
  <table cellspacing="10" width="100%">
      <thead>
        <tr>
          <th>Type</th>
          <th>SKU</th>

          <th>Description</th>
          <th>Quantity</th>
          <th>Weight</th>           
          <th>Unit Price</th>
          <th>Discount</th>
          <th>Net Price</th>

        </tr>
      </thead>
      <tbody>
               <tr>
            <td>Product</td>
            <td></td>
            <td>test 1234 1234&nbsp;</td>
            <td>2</td>

            <td>0.00 lbs</td>
	    <td>$15.00</td>
	    <td></td>
            <td>$15.00</td>
          </tr>
           </tbody>
  </table>

  </fieldset>  
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: nbsp characters in order_items table

Post by nicmare »

i can confirm that bug. i was also wondering why there is a &nbsp;
'product_name' => 'mycar&nbsp;'
the problem is that it also appears when purchasing with paypal which looks a bit strange.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: nbsp characters in order_items table

Post by Dr.CSS »

I would start with Products and look at every template to make sure there isn't an extra &nbsp; in there some where...
caciavar
Forum Members
Forum Members
Posts: 64
Joined: Wed Feb 11, 2009 6:30 pm
Location: Toronto, Canada

Re: nbsp characters in order_items table

Post by caciavar »

I checked the products module templates, nothing in there. When I look at the products table in the database, that product does not include any nbsp's. Its definitely occurring when products are passed to orders.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: nbsp characters in order_items table

Post by Dr.CSS »

I meant look at Products first then move on to the next module called in the process and check all of it's templates then move to the next and do the same thing, I've used all of these and never saw this...
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: nbsp characters in order_items table

Post by maranc »

Hi, the problem isn't in Order, Cart or Product module. Please go to CGEcommerce tab, find suplier setting tab and look for Line Item Description Template, here is somthing like this:
{* product summary template *}
{* used for summarizing products in view cart form page *}
{strip}
{$oneproduct.product_name}&nbsp; <------remove this
{foreach from=$meta->attributes item='attrib'}
{$attrib->name}&nbsp;{if $attrib->adjustment != 0}{$currencysymbol}({$attrib->adjustment|number_format:2}){/if}
{/foreach}
{/strip}

This is an answer why you this issue.
Plase remove &nbsp;

Marek A.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: nbsp characters in order_items table

Post by nicmare »

yea, that was the reason. thank you very much!!
caciavar
Forum Members
Forum Members
Posts: 64
Joined: Wed Feb 11, 2009 6:30 pm
Location: Toronto, Canada

Re: nbsp characters in order_items table

Post by caciavar »

Awesome, worked for me too. Thanks a million.
Post Reply

Return to “Modules/Add-Ons”