Post by Shark » Sun Oct 31, 2010 9:58 pm

Hi,

I noticed that in every form that uses a country selectbox, if you by accident change the selected country to
--- Please Select ---
you get an error in the "Post Code" field:

Notice: Undefined index: postcode_required in /home/opencart/public_html/demo/catalog/controller/account/create.php on line 431Post Code:

Where can I best fix this; in the php-code or in the (inline) javascript code?

User avatar
Active Member

Posts

Joined
Sun Oct 31, 2010 9:43 pm
Location - Haarlem

Post by Qphoria » Sun Oct 31, 2010 10:05 pm

Wow nice find. I will look into that

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Emadello » Mon Nov 01, 2010 7:52 pm

Hello People,

I have posted a Fix for those who have problems with Authorize.net not processing orders..

please check: http://forum.opencart.com/viewtopic.php?f=31&t=22159

Newbie

Posts

Joined
Mon Nov 01, 2010 7:44 pm

Post by philpot222 » Mon Nov 01, 2010 9:30 pm

I had a client raise the same issue.

I fixed it by modifying the public function postcode() in catalog/controller/checkout/guest_step_1.php

Old code:

Code: Select all

public function postcode() {

                $this->language->load('checkout/guest_step_1');

                $this->load->model('localisation/country');

        $result = $this->model_localisation_country->getCountry($this->request->get['country_id']);

                $output = '';

        if ($result['postcode_required']) {
                $output = '<span class="required">*</span> ' . $this->language->get('entry_postcode');
                } else {
                        $output = $this->language->get('entry_postcode');
                }

                $this->response->setOutput($output, $this->config->get('config_compression'));
        }
 
New code:

Code: Select all

public function postcode() {

                $this->language->load('checkout/guest_step_1');

                $this->load->model('localisation/country');

        $result = $this->model_localisation_country->getCountry($this->request->get['country_id']);

                $output = '';

                $postcodeRequired = (count($result) > 0) ? $result['postcode_required'] : 0;

                if ($postcodeRequired) {
                        $output = '<span class="required">*</span> ' . $this->language->get('entry_postcode');
                } else {
                        $output = $this->language->get('entry_postcode');
                }

                $this->response->setOutput($output, $this->config->get('config_compression'));
        } 
it is caused by the result array being return empty.

Phil

Newbie

Posts

Joined
Mon Nov 01, 2010 9:23 pm

Post by sumitson » Tue Nov 02, 2010 7:49 pm

bader wrote:

Code: Select all

Notice: Undefined index: subtract in /home/bader/public_html/mall/admin/model/sale/order.php on line 12Notice: Undefined index: subtract in /home/bader/public_html/mall/admin/model/sale/order.php on line 12Notice: Undefined index: subtract in /home/bader/public_html/mall/admin/model/sale/order.php on line 12Warning: Cannot modify header information - headers already sent by (output started at /home/bader/public_html/mall/admin/index.php:72) in /home/bader/public_html/mall/system/engine/controller.php on line 27
Anyone gets this error with 1.4.9.1 when you delete an order?
Yes, I am getting the same error. Can anyone help and tell me how I am supposed to resolve this?

Newbie

Posts

Joined
Sun Oct 17, 2010 9:29 am

Post by Qphoria » Tue Nov 02, 2010 7:52 pm

sumitson wrote:
bader wrote:

Code: Select all

Notice: Undefined index: subtract in /home/bader/public_html/mall/admin/model/sale/order.php on line 12Notice: Undefined index: subtract in /home/bader/public_html/mall/admin/model/sale/order.php on line 12Notice: Undefined index: subtract in /home/bader/public_html/mall/admin/model/sale/order.php on line 12Warning: Cannot modify header information - headers already sent by (output started at /home/bader/public_html/mall/admin/index.php:72) in /home/bader/public_html/mall/system/engine/controller.php on line 27
Anyone gets this error with 1.4.9.1 when you delete an order?
Yes, I am getting the same error. Can anyone help and tell me how I am supposed to resolve this?
Read the first post or upgrade to 1.4.9.2 patch (see link in my signature)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bluelight » Wed Nov 03, 2010 6:46 pm

When I edit order (total is 100$), and add product with price 50$ to order, everything is ok (total is 150$), but when I add another product (price is 30$) to order, total is wrong (total value is 30$). Back to order list total is 0.

I have tried many times but the result remains the same.

Newbie

Posts

Joined
Tue Oct 05, 2010 12:03 pm

Post by Buster Gonad » Mon Nov 08, 2010 1:21 pm

Hi,

I disabled "Allow Reviews" in admin>System>Option however in the frontend, the "Sort By" still shows "Rating Highest" & "Rating Lowest" as options.

Does anyone have a quick fix?

Imagination Is Everything


User avatar
Newbie

Posts

Joined
Tue Oct 12, 2010 12:08 am

Post by Johnathan » Mon Nov 08, 2010 10:07 pm

The easiest way is to do it using jQuery. That way you only have to make one declaration for all the different product display pages. Here's the edit:

IN:

Code: Select all

/catalog/view/theme/YOURTHEME/template/common/footer.tpl
BEFORE:

Code: Select all

</body> 
ADD:

Code: Select all

<script type="text/javascript">
$(document).ready(function(){
    $('option:contains("Rating Highest")').remove();
    $('option:contains("Rating Lowest")').remove();
});
</script>

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Xsecrets » Mon Nov 08, 2010 10:28 pm

I'm pretty sure this was corrected in one of the recent 1.4.x releases. If you are not using the default template though all bets are off.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by momtrepreneur » Fri Nov 12, 2010 2:59 am

Anybody come across this in 1.4.9.1?
Image
The date is backwards...

Opencart 1.4.9.1
Global Options Mod


New member

Posts

Joined
Wed Apr 21, 2010 2:27 am

Post by i2Paq » Fri Nov 12, 2010 3:48 am

momtrepreneur wrote:Anybody come across this in 1.4.9.1?

The date is backwards...
Well, that depends in what part of the world you are living...

In Europe it could/would be: 11 July 2010 or 11/07/2010.

But in the US 11/07/2010 could mean 7 November 2010.

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 momtrepreneur » Fri Nov 12, 2010 8:40 am

Oh, wow...um that's confusing! I'm in the US and use english for the cart. The order was placed on November 7, 2010. How do I get the cart to reference American dates?

Opencart 1.4.9.1
Global Options Mod


New member

Posts

Joined
Wed Apr 21, 2010 2:27 am

Post by Qphoria » Fri Nov 12, 2010 10:48 am

Xsecrets wrote:I'm pretty sure this was corrected in one of the recent 1.4.x releases. If you are not using the default template though all bets are off.
Nah I forgot about this. I'm working on making sort values admin configurable like the order statuses and stock statuses are, so you can enter or remove any filter options you want

Sort by model, sku, price, qty, weight, custom field, etc

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Fri Nov 12, 2010 12:00 pm

momtrepreneur wrote:Oh, wow...um that's confusing! I'm in the US and use english for the cart. The order was placed on November 7, 2010. How do I get the cart to reference American dates?
In /admin/language/english/english.php and /catalog/language/english/english.php, change:

Code: Select all

$_['date_format_short']       = 'd/m/Y';
$_['date_format_long']        = 'l dS F Y'; 
to the following:

Code: Select all

$_['date_format_short']       = 'm/d/Y';
$_['date_format_long']        = 'l, F dS, Y'; 

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by jerdna » Fri Nov 12, 2010 9:43 pm

Helo
Im having problem with adding things to shopping cart.
I ad one thing and continue shopping and when i select and ad another one it writes over previous one in shopping cart. And so on with next thing......Some times i actually can do it if i select same thing in different colors but most of the time no.
Recently I have installed OptionPlus module because of diversity of colors of some products......Im not sure problem is connected with this install because i did not by on my page for a while. But i m sure everything worked after upgrade to 1.4.9.1 . I don t have any other mod installed on the site.
Link to my front end for better idea whats wrong:
http://www.kovcki.co.cc

You can register and try to buy few things...the site does not sell for real yet.

I tried different browsers it is the same.
I would not like to uninstall option plus because i need it and i bought it......Qphoria can you look at this please.....if you need to see admin site.......let me know.

Im uploading product to finalize site and now this discovery ......i m stressed a little bit.

Thank you my savior.

Newbie

Posts

Joined
Fri Nov 12, 2010 8:18 pm

Post by Qphoria » Fri Nov 12, 2010 11:18 pm

I think xsecrets said this was due to register globals being on.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jerdna » Sat Nov 13, 2010 12:15 am

I think it is not because i have the site 4 weeks runing on same server and until now no problem with that.

May ini file:

register_globals = Off;
default_charset = UTF-8;
memory_limit = 64M;
max_execution_time = 18000;
max_upload_filesize = 100M;
safe_mode = Off;
mysql.connect_timeout = 20;
session.use_cookies = On;
session.use_trans_sid = Off;
session.gc_maxlifetime = 12000000;

Any other idea would be good.

Thx

Newbie

Posts

Joined
Fri Nov 12, 2010 8:18 pm

Post by Xsecrets » Sat Nov 13, 2010 12:54 am

yeah yours looks to be a different problem. when register globals are turned on then if you remove an item from the cart the last one pops back in which is not the case on yours. Though the issue you are seeing does not happen on a default install. My guess would be that it has something to do with the options plus mod. Possibly not installed properly I don't know.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US
Who is online

Users browsing this forum: Bing [Bot] and 9 guests