Post by Qphoria » Wed Apr 21, 2010 11:38 pm

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Thu Apr 22, 2010 2:38 am

Qphoria wrote:Cannot reproduce
I've tried on 2 site's and I can also not reproduce.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by fritz » Fri Apr 23, 2010 1:16 am

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

Newbie

Posts

Joined
Fri Apr 23, 2010 12:25 am

Post by visnetmedia » Fri Apr 23, 2010 6:45 am

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

Active Member

Posts

Joined
Fri Feb 12, 2010 7:17 am

Post by fido-x » Fri Apr 23, 2010 8:36 am

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}';

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by fritz » Fri Apr 23, 2010 10:37 am

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))));

Newbie

Posts

Joined
Fri Apr 23, 2010 12:25 am

Post by fido-x » Fri Apr 23, 2010 12:26 pm

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.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by fritz » Fri Apr 23, 2010 1:30 pm

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!

Newbie

Posts

Joined
Fri Apr 23, 2010 12:25 am

Post by rednet » Sat Apr 24, 2010 2:56 am

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'

Newbie

Posts

Joined
Wed Feb 10, 2010 6:09 am

Post by Qphoria » Sat Apr 24, 2010 3:56 am

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by audiomarket » Sat Apr 24, 2010 8:50 pm

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

New member

Posts

Joined
Mon Mar 15, 2010 1:55 am

Post by Qphoria » Sat Apr 24, 2010 9:09 pm

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?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by gmcalpin » Sat Apr 24, 2010 10:59 pm

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

Newbie

Posts

Joined
Fri Apr 23, 2010 5:06 am

Post by tommyla » Sun Apr 25, 2010 5:22 pm

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*
Last edited by tommyla on Sun Apr 25, 2010 5:44 pm, edited 1 time in total.

Active Member

Posts

Joined
Wed Jul 22, 2009 9:49 pm
Location - Norway

Post by i2Paq » Sun Apr 25, 2010 5:31 pm

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.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by potas » Mon Apr 26, 2010 2:06 am

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.

Opencart - polska społeczność / Polish community


Newbie

Posts

Joined
Wed Apr 07, 2010 4:11 am


Post by potas » Mon Apr 26, 2010 2:24 am

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.

Opencart - polska społeczność / Polish community


Newbie

Posts

Joined
Wed Apr 07, 2010 4:11 am


Post by Qphoria » Mon Apr 26, 2010 4:27 am

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.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Mon Apr 26, 2010 4:32 am

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

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by potas » Mon Apr 26, 2010 5:00 am

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.

Opencart - polska społeczność / Polish community


Newbie

Posts

Joined
Wed Apr 07, 2010 4:11 am

Who is online

Users browsing this forum: No registered users and 132 guests