Page 7 of 13

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Wed Apr 21, 2010 11:38 pm
by Qphoria
visitor wrote:
Qphoria wrote:
visitor wrote:If i want to print the invoice over the administration menu then this message is showing up.:

Notice: Undefined index: invoice_id in /disk1/www/ver/htdocs/shop/admin/model/sale/order.php on line 124Notice: Undefined index: invoice_prefix in /disk1/www/ver/htdocs/shop/admin/model/sale/order.php on line 125
Did you set the default invoice number in the system->settings?
If you mean "Invoice Start NO.:" and "Invoice Prefix:"... then yes. I set both.
Cannot reproduce

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Thu Apr 22, 2010 2:38 am
by i2Paq
Qphoria wrote:Cannot reproduce
I've tried on 2 site's and I can also not reproduce.

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Fri Apr 23, 2010 1:16 am
by fritz
I hope this is the correct place to report this minor issue.

Title:
Address labels do not permit multiple spaces.

Description:
OpenCart does not allow an address format that includes multiple space delimiters.
For example the Canadian (and perhaps others) Postal System standard address format is:

Recipient Name
Address_Line_1
Address_Line_2 (optional)
City<SP>Zone_Code<SP><SP>Postal_Code
Country

In OpenCart, the regular expression used to form the label replaces multiple spaces with a break
so the Postal Code is displayed by itself on a seperate line. It would display as

...
City<SP>ZoneCode
Postal_Code
Country

Reported on:
1.4.7

Error message(s)
n/a

Classification:
[TEAM] Critical/High/Medium/Low/Enhancement

Affected functions:
Shipping and payment labels

Related files:
upload/admin/controller/sale/order.php
upload/catalog/model/checkout/order.php
upload/catalog/controller/checkout/confirm.php
upload/catalog/controller/checkout/payment.php
upload/catalog/controller/checkout/shipping.php
upload/catalog/controller/checkout/guest_step_3.php
upload/catalog/controller/account/invoice.php

Steps to replicate:
Enter the Canadian address format into country settings in admin.
Register as a Canadian customer.
Checkout an item.
The postal code is on a line to itself in the shipping address

Analysis:
[TEAM] Confirmed/Unable to confirm/Rejected
Any other comments

Proposed fix(es):

The quick fix is to embed the second desired space in the address label as &nbsp; but this is not friendly
towards non-technical users.

A better fix is to replace all occurances of:

Code: Select all

str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format))));
with:

Code: Select all

preg_replace("/&nbsp;\s/", "&nbsp;&nbsp;", 
    preg_replace("/\s\s/", " &nbsp;",
    preg_replace("/(\r*\n\s*)+/", "<br />",
    trim(str_replace($find, $replace, $format)))));
Which replaces all second and subsequent occurances of spaces with &nbsp; while preserving blank line skipping. Perhaps somebody who is more of a regular expression wizard can come up with something
more effiecient.

System info:
n/a

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Fri Apr 23, 2010 6:45 am
by visnetmedia
Hi in using the admin to give an option to product I get:
Notice: Undefined index: product_option_value in /home/----/----/----/admin/view/template/catalog/product_form.tpl on line 335

In the front store when doing a search the search outputs same product 30 times before showing the next product in search

thanks...

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Fri Apr 23, 2010 8:36 am
by fido-x
fritz wrote:I hope this is the correct place to report this minor issue.

Title:
Address labels do not permit multiple spaces.

Description:
OpenCart does not allow an address format that includes multiple space delimiters.
For example the Canadian (and perhaps others) Postal System standard address format is:

Recipient Name
Address_Line_1
Address_Line_2 (optional)
City<SP>Zone_Code<SP><SP>Postal_Code
Country
This is not a bug, it is merely the default formatting for the address. You can change it to suit in "catalog/controller/checkout/payment.php", "catalog/controller/checkout/shipping.php" and "catalog/controller/checkout/guest_step_3.php". Find the following line of code (around line 145 in payment.php, line 138 in shipping.php and lines 282 and 332 in guest_step_3.php):-

Code: Select all

$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}';
Change to or replace with:

Code: Select all

$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {zone}&nbsp;&nbsp;{postcode}' . "\n" . '{country}';

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Fri Apr 23, 2010 10:37 am
by fritz
fido-x wrote:
fritz wrote:I hope this is the correct place to report this minor issue.

Title:
Address labels do not permit multiple spaces.

Description:
OpenCart does not allow an address format that includes multiple space delimiters.
For example the Canadian (and perhaps others) Postal System standard address format is:

Recipient Name
Address_Line_1
Address_Line_2 (optional)
City<SP>Zone_Code<SP><SP>Postal_Code
Country
This is not a bug, it is merely the default formatting for the address. You can change it to suit in "catalog/controller/checkout/payment.php", "catalog/controller/checkout/shipping.php" and "catalog/controller/checkout/guest_step_3.php". Find the following line of code (around line 145 in payment.php, line 138 in shipping.php and lines 282 and 332 in guest_step_3.php):-

Code: Select all

$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}';
Change to or replace with:

Code: Select all

$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {zone}&nbsp;&nbsp;{postcode}' . "\n" . '{country}';
I was not using the default formatting. As mentioned in the original post, this is when the address format is changed in the admin (System->Localization->Countries). When an address format is set there it overrides the default formatting what you suggested to change. Anyways your fix still wouldn't work as the regular expression replace will still match the double spaces and replace with a break.

as currently in OpenCart:
str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format))));

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Fri Apr 23, 2010 12:26 pm
by fido-x
fritz wrote:...As mentioned in the original post, this is when the address format is changed in the admin (System->Localization->Countries). When an address format is set there it overrides the default formatting what you suggested to change. Anyways your fix still wouldn't work as the regular expression replace will still match the double spaces and replace with a break.
Missed that bit about setting it through the admin. However, the code I gave you will work and will be used as the "default" if you don't enter anything into the address format field under "System->Localization->Countries".

Since the code above includes no-break spaces between the zone and the postcode they will not be seen as "spaces" by the "str_replace()" function you mentioned.

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Fri Apr 23, 2010 1:30 pm
by fritz
fido-x wrote:Since the code above includes no-break spaces between the zone and the postcode they will not be seen as "spaces" by the "str_replace()" function you mentioned.
Sorry I didn't look close enough at your replacement and missed the escaped spaces, Doh!

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Sat Apr 24, 2010 2:56 am
by rednet
Q,
Can you view this problem?
rednet wrote:Hi,
If product, category, manufacturer or information have the same seo keyword the front store doesn´t work fine.
You must be control duplicate´s seo keywords by oc_url_alias.keyword field with unique value.
I use "ALTER TABLE `oc_url_alias` ADD UNIQUE (`keyword`);" but you don´t have a control function in the system.
Error: Duplicate entry 'apple' for key 2
Error No: 1062
INSERT INTO ds_url_alias SET query = 'product_id=42', keyword = 'apple'

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Sat Apr 24, 2010 3:56 am
by Qphoria
This isn't a problem. Just don't be dumb enough to use the same keyword. I can add it to the next version but you've already answered your own question

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Sat Apr 24, 2010 8:50 pm
by audiomarket
But you can integrate a new function thet when add a new item search duplicate end in this case show a error message!!
sometimes you lose in a water glass!!
(with jquery apps you can refresh the input box after key down)
Bye, Marco

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Sat Apr 24, 2010 9:09 pm
by Qphoria
audiomarket wrote: sometimes you lose in a water glass!!
Do all your people feel the need to make irrelevant prophetic statements that hold no analogous value with your posts?

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Sat Apr 24, 2010 10:59 pm
by gmcalpin
Like dramony, I get this UPS Error when trying to check out in 1.4.7, too:
Unknown: Object of class DOMElement could not be converted to string in C:\Inetpub\wwwroot\opencart_v1.4.7\upload\catalog\model\shipping\ups.php on line 218

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Sun Apr 25, 2010 5:22 pm
by tommyla
i had to remove line 51 and some other lines in index.php when i upgraded from 1.4.0 i belive when i got alot of errors ::)
worked fine after i did that, and i did follow the *upgrade.txt*

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Sun Apr 25, 2010 5:31 pm
by i2Paq
tommyla wrote:i had to remove line 51 and some other lines in index.php when i upgraded from 1.4.0 i belive ::)
worked fine after i did that, and i did follow the *upgrade.txt*
And why is that a Bug?
It could be something from and own modification or something.
If you do not have more info I will remove your reply.

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Mon Apr 26, 2010 2:06 am
by potas
Rss error. It applies for link:
http://www.YOURS_DOMAIN.com/index.php?route=feed/google_base

Adding new link in 1.4.6:
Clicking "Add", filling what is necessary and then "Save"; and then every RSS subscriber (including Google) got a message that a new product was added.

In 1.4.7 is possibility of copying the product:
Clicking on "Copy" and then changing some product data and then "Save"; then no message to subscribers is sent.

It seems that it would be a good to inform RSS subscribers about every change on site.

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Mon Apr 26, 2010 2:24 am
by potas
In admin System/Options I've set up order status Pending.
In the database, in table 'oc_setting' key[config_order_status_id] = 1 and customer after ordering sees in the order history - status Cancelled; so it looks like in the table 'oc_setting' is key[config_order_status_id] and equals 4 so Cancelled.
It looks like order status is set up by default on Cancelled or script reads something in the wrong way.

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Mon Apr 26, 2010 4:27 am
by Qphoria
potas wrote:Rss error. It applies for link:
http://www.YOURS_DOMAIN.com/index.php?route=feed/google_base
Not sure what this means. I was sure to test RSS with the default setup and it worked. Not sure what "applies for link" means
Adding new link in 1.4.6:
Clicking "Add", filling what is necessary and then "Save"; and then every RSS subscriber (including Google) got a message that a new product was added.


In 1.4.7 is possibility of copying the product:
Clicking on "Copy" and then changing some product data and then "Save"; then no message to subscribers is sent.

It seems that it would be a good to inform RSS subscribers about every change on site.
When you add a new product it will pick it up next time their RSS is updated. Google only got updates once per day or whenever your googlebase scheduler was set to run.

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Mon Apr 26, 2010 4:32 am
by Qphoria
potas wrote:In admin System/Options I've set up order status Pending.
In the database, in table 'oc_setting' key[config_order_status_id] = 1 and customer after ordering sees in the order history - status Cancelled; so it looks like in the table 'oc_setting' is key[config_order_status_id] and equals 4 so Cancelled.
It looks like order status is set up by default on Cancelled or script reads something in the wrong way.
Canceled is just the default one at the top of the list. Its not "set" its just "no status" and it shows canceled because its first alphabetically

Re: Post any OpenCart 1.4.7 Bugs here!

Posted: Mon Apr 26, 2010 5:00 am
by potas
Qphoria wrote:When you add a new product it will pick it up next time their RSS is updated.
When we add a new product using ADD button then info is sent to RSS subscribers. But when we add a new product using COPY button there is no info sent. It will be good to inform subscribers also about products added using a copy function.