[SOLVED] nbsp characters in order_items table
[SOLVED] nbsp characters in order_items table
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
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.
Re: nbsp characters in order_items table
Have you looked at the template that produces that part of the system?...
Re: nbsp characters in order_items table
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.
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.
Re: nbsp characters in order_items table
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":
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 </td>
<td>2</td>
<td>0.00 lbs</td>
<td>$15.00</td>
<td></td>
<td>$15.00</td>
</tr>
</tbody>
</table>
</fieldset>
Re: nbsp characters in order_items table
i can confirm that bug. i was also wondering why there is a
'product_name' => 'mycar '
the problem is that it also appears when purchasing with paypal which looks a bit strange.
'product_name' => 'mycar '
the problem is that it also appears when purchasing with paypal which looks a bit strange.
Re: nbsp characters in order_items table
I would start with Products and look at every template to make sure there isn't an extra in there some where...
Re: nbsp characters in order_items table
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.
Re: nbsp characters in order_items table
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...
Re: nbsp characters in order_items table
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} <------remove this
{foreach from=$meta->attributes item='attrib'}
{$attrib->name} {if $attrib->adjustment != 0}{$currencysymbol}({$attrib->adjustment|number_format:2}){/if}
{/foreach}
{/strip}
This is an answer why you this issue.
Plase remove
Marek A.
{* product summary template *}
{* used for summarizing products in view cart form page *}
{strip}
{$oneproduct.product_name} <------remove this
{foreach from=$meta->attributes item='attrib'}
{$attrib->name} {if $attrib->adjustment != 0}{$currencysymbol}({$attrib->adjustment|number_format:2}){/if}
{/foreach}
{/strip}
This is an answer why you this issue.
Plase remove
Marek A.
Re: nbsp characters in order_items table
yea, that was the reason. thank you very much!!
Re: nbsp characters in order_items table
Awesome, worked for me too. Thanks a million.