Post by beipink » Sat Aug 31, 2013 9:51 am

jan_00 wrote:hi
i use opencart 1.5.5.1 and i have a problem in filter of order in admin with date modified when i use it i get this error

Notice: Error: Unknown column 'o.date_modified' in 'where clause'
Error No: 1054
SELECT COUNT(*) AS total FROM `oc_order` WHERE order_status_id > '0' AND DATE(o.date_modified) = DATE('2013-02-02') in **********************system\database\mysql.php on line 50

how can i fix it?
thanks
Have you found any solution to this?

Active Member

Posts

Joined
Tue Mar 20, 2012 7:43 pm

Post by storm-cloud » Sun Sep 15, 2013 10:17 pm

Just an observation. I am not sure if this is critical enough to be classified as a bug (as the filter function still works regardless) but thought it might be worth mentioning.

In relation to the filters module, I noticed that the URL parameter includes an ampersand for the first query when SEO URL's are enabled. Shouldn't the first query always follow a question mark and then an ampersand for each subsequent parameter?

Instead of:
example.com.au/category&filter=1

Shouldn't it be?
example.com.au/category?filter=1

Edit - I have a working fix but this is not the most elegant solution. I will provide this though just in case someone else is as pedantic as I am and must have everything semantically correct and valid!

In catalog/view/theme/*/template/module/filter.tpl

Find:

Code: Select all

location = '<?php echo $action; ?>&filter=' + filter.join(',');
Replace:

Code: Select all

location = '<?php echo $action; ?><?php if (($this->config->get('config_seo_url')) && (!isset($this->request->get['sort'])) && (!isset($this->request->get['limit']))) { ?>?filter='<?php } else { ?>&filter='<?php } ?> + filter.join(',');

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by storm-cloud » Sat Sep 21, 2013 7:05 pm

Cosmological wrote:I'm having a problem with maintenance mode. Vanilla install, no templates or mods installed.
Issue is that I'm still able to browse categories and products whilst the site is in maintenance mode - when it's set to use SEO URLs. Only the products and/or categories that have SEO links assigned are affected - other products, categories and pages - including the home page - cannot be accessed; the maintenance mode text is displayed, as it should be.
I've replicated this issue over two entirely different installs. It is not caused by my being logged in - I can access the products that have SEO URLs assigned from an entirely different machine (so not a session / cache issue either).
Apologies if I'm being a total dunce here and overlooking something obvious.

Dan
I have just noticed this exact same thing.

Is anyone able to offer a fix for this issue? I would think that an issue such as this is quite important as being able to set the store in maintenance mode is vital for any store owner.

Edit: Found a fix: http://forum.opencart.com/viewtopic.php ... 60#p349072

PS: I found that it is not required to commit the first modification suggested above (swapping the lines of code in index.php) as v1.5.5.1 already has these lines in the correct order.

It would still be nice to see this corrected in the core download files.

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by rdvapors » Wed Dec 11, 2013 10:07 pm

Hello, I see that this report has many threads but no answers.

I recently discovered the process that causes this problem. The problem is that the cart does not check or notice that the quantities have gone negative before the checkout process or next step. Here is the process I found when talking to my customers.

1. On product page, add the product to the cart with any option any quantity below the stock level.
2. Without leaving the product page, add the same product with a different option below the stock level.
3. The total quantities ordered is below the stock level now.
4. Proceed to checkout, and press next.
5. The cart does not check the quantities totaled and will allow the customer to proceed with the checkout.

Settings of my cart.
1. Under products>>Data, Subtract Stock is set to "Yes".
2. Under products>>Options, All Subtract Stock is set to "No" with quantities of "0".

Note: Setting the products>>Options, to Subtract Stock to "Yes" will stop the checkout process. However in my case, each item is made to order and not dependent on options. Is it possible to have a way to allow the process to only check stock quantities determined by the products>>Data quantity fields?

New member

Posts

Joined
Thu Dec 13, 2012 11:29 pm

Post by kiarabos » Sat Jan 11, 2014 4:19 am

Hello, I have installed OpenCart 1.5.5.1 released by Lbit, that also includes the Italian Language and everything was fine. Then I upload a themeforest theme (OXY), everything fine, except for this error
Warning: strpos() [function.strpos]: Empty delimiter in /membri/dyadistribution/catalog/controller/common/header.php on line 152
I contacted the theme supplier and they say to ask to this forum as depends on opencart. He gave me this link: http://forum.opencart.com/viewtopic.php?f=161&t=93332
but here I could not find solution.
Anyone can help me?
thanks

Newbie

Posts

Joined
Sat Jan 11, 2014 4:13 am

Post by ADD Creative » Sun Jan 12, 2014 2:37 am

There is no line 152 in catalog/controller/common/header.php. The problem is most likly caused by you theme or modifications.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Sun Jan 12, 2014 4:15 am

Then I upload a themeforest theme (OXY), everything fine, except for this error
Since line 152 doesn't exist in the header.php, you should un-install the theme, or do a fresh install without that theme.

In general, themeforst themes tend to have quite a few problems, they seem to break many things, including 3rd party addons. You should always check that Opencart web themes are adhering to Opencart standards and don't change core files like your header.php file.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by tonni » Wed Jan 29, 2014 3:37 am

Don't know if this is the right forum and if it is not - my apologies. I've been reading lots of post and have not been able to find anything about my problem. Using v.1.5.5.1 - all products on my store are download products. A customer brought this issue.

Cannot make a second order until the first one is filled.
Placed an order for a product, executed the payment through PayPal. After payment confirmation from PayPal, the customer tries to place a 2nd order and when she goes to the shopping cart, the product already paid for (1st order) is still shown there. She tried but cannot delete it and if tried to move forward with the 2nd order, the system duplicates the 1st order.

It was not until the 1st order was completed that the shopping cart emptied its content and let her continue with the 2nd order.

Is this normal behavior of OpenCart, or is there anything that can be done to let the customer place a 2nd order without duplicating the 1st one.

Thanks.

Newbie

Posts

Joined
Sat May 18, 2013 1:56 am

Post by fashionmakers » Fri May 09, 2014 5:28 pm

With the upgrade of OpenCart from 1.5.2.1 to 1.5.6.1 I have an error.

2014-05-08 23:13:49 - PHP Notice: Error: Unknown column 'cg.name' in 'field list'<br />Error No: 1054<br />SELECT *, CONCAT(c.firstname, ' ', c.lastname) AS name, cg.name AS customer_group FROM hbcustomer c LEFT JOIN hbcustomer_group cg ON (c.customer_group_id = cg.customer_group_id) ORDER BY name ASC LIMIT 0,20 in /home/hainuteb/public_html/www.haineonlinecopii.ro/system/database/mysql.php on line 50

Somebody can help me solve this ?

Fashion Makers
www.haineonlinecopii.ro


New member

Posts

Joined
Mon Feb 04, 2013 12:24 am

Post by frankleng » Sun Sep 28, 2014 10:22 pm

i have paypal checkout issue, paypal amount does not match opencart amount,
paypal give error:recerver email mismatch.
i found a mod to solve the problem. However, paypal give show error:format incorrectly....
When i want to reproduce the problem, when add little amount to shipping cost,or change to a different shipping method, the problem will be gone. Very wired.
http://forum.opencart.com/viewtopic.php?f=20&t=131297
http://forum.opencart.com/viewtopic.php?f=20&t=131470

Active Member

Posts

Joined
Sun Apr 22, 2012 5:49 pm

Post by ADD Creative » Tue Sep 30, 2014 3:46 am

Do you have any examples that always cause the problem? If you give me the product prices, quantities and totals that cause the error, I'll try to recreate it.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by frankleng » Tue Sep 30, 2014 4:47 pm

ADD Creative wrote:Do you have any examples that always cause the problem? If you give me the product prices, quantities and totals that cause the error, I'll try to recreate it.
Thanks. I replicate the error again on my oc1.5.5.1. since the error rate is high when free shipping is enabled. I enabled the free shipping again. Attached in the zip file are details, with many pictures and data on it.

When testing with different order quantity, it did not show regular rules.
During my long test, I finally replicate this error on a product,
FOr order quanity from 5-9, it's ok. Paypal works.
But, from 10-14, it's broken.
And, from 15, it's ok again.
I don't know whether it will happen always this way. For the time being and for this product, it is.
You may notice the price is different when order is 10, i set discount when order is over 10 or 50.
I also noticed the error before when order quantity is 9. I'm not sure whether it's discount related.
However, when order quantity is 15, paypal works again. This issue is really really wired..

Attached are two mods, one is from the above link (made into a mod by someone, and modified back )
the other is the free shipping mod alert with weight limit.
During the test, i set total amount for free shipping is 380 (chinese yuan).
(Back end is Chinese yuan, and front end is USD. I have multiple currencies in my store.)
and weight is 2kg. I also tried to input different value for both weight and amount when order is 10, no matter how much it is, at 10, it always bring errors.
If i delete the alert and weight limit mod. The error is still there.
order9.jpg

order9.jpg (104.96 KiB) Viewed 8803 times

from 5-9, paypal is working.
order10.jpg

order10.jpg (98.19 KiB) Viewed 8803 times

from 10, paypal stops working.
(at this time, If i choose a different shipping method, it's working again.
And, if i remove this mismatch fix mod, it's working again, but it will give mismatch error sometimes)

from 15, paypal is back working.
All pics in the zip file.

Active Member

Posts

Joined
Sun Apr 22, 2012 5:49 pm

Post by ADD Creative » Tue Sep 30, 2014 11:23 pm

Thanks for the information. I've tracked down the issue.

Try changing the following in catalog/controller/payment/pp_standard.php (or your vQmod)

Code: Select all

$total = $this->currency->format($order_info['total'], $order_info['currency_code'], false, false) - $subtotal;
to

Code: Select all

$total = $this->currency->format($this->currency->format($order_info['total'], $order_info['currency_code'], false, false) - $subtotal, $order_info['currency_code'], 1.0, false);
or even to this

Code: Select all

$total = $this->currency->format($this->currency->convert($order_info['total'], $this->config->get('config_currency'), $order_info['currency_code']) - $subtotal, $order_info['currency_code'], 1.0, false);

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by frankleng » Wed Oct 01, 2014 12:00 am

ADD Creative wrote:Thanks for the information. I've tracked down the issue.

Try changing the following in catalog/controller/payment/pp_standard.php (or your vQmod)

Code: Select all

$total = $this->currency->format($order_info['total'], $order_info['currency_code'], false, false) - $subtotal;
to

Code: Select all

$total = $this->currency->format($this->currency->format($order_info['total'], $order_info['currency_code'], false, false) - $subtotal, $order_info['currency_code'], 1.0, false);
or even to this

Code: Select all

$total = $this->currency->format($this->currency->convert($order_info['total'], $this->config->get('config_currency'), $order_info['currency_code']) - $subtotal, $order_info['currency_code'], 1.0, false);
You are superb. Thanks a bunch. Attached is the mod ( i just found that you are the author of this solutoin.
And, the zip file also include the thomash2's little change for tax. (i'm not quite sure about its function. )


I also uploaded this mod here, i hope you don't mind.
http://www.opencart.com/index.php?route ... n_id=18507

Active Member

Posts

Joined
Sun Apr 22, 2012 5:49 pm

Post by frankleng » Wed Oct 01, 2014 12:52 am

rupaknepali wrote:After adding the product when we click on checkout and then instantly click some link then a popup with error message is shown.

I have clicked the Checkout and instantly click the shopping cart link
Image
On shopping cart page, i have this error, too.
with agivera's solution on the following page
http://forum.opencart.com/viewtopic.php?t=85466
, the error rate drops. However, It comes out occassionally. If someone knows a fix, that will be better.

Active Member

Posts

Joined
Sun Apr 22, 2012 5:49 pm

Post by frankleng » Thu Oct 09, 2014 3:10 pm

recently, i got this error
PHP Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority LIMIT 0,1' at line 2<br />Error No: 1064<br />SELECT date_end FROM oc_product_special
WHERE product_id ='60'"' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority LIMIT 0,1 in /vqmod/vqcache/vq2-system_database_mysql.php on line 71
For product ID, i do not have special price set for it. I did, but not now.
A similar report was found here,
http://forum.opencart.com/viewtopic.php ... 6&p=379467

Active Member

Posts

Joined
Sun Apr 22, 2012 5:49 pm

Post by ADD Creative » Thu Oct 09, 2014 5:12 pm

The problem looks to be:

Code: Select all

product_id ='60'"'
However I can find no SQL queries in the 1.5.5 code matching your error, so look like it's a problem with a modification.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by frankleng » Thu Oct 09, 2014 5:37 pm

ADD Creative wrote:The problem looks to be:

Code: Select all

product_id ='60'"'
However I can find no SQL queries in the 1.5.5 code matching your error, so look like it's a problem with a modification.
Thanks. Do you mean a vqmod caused this problem?
It will be hard for me to find the solution. I don't know when this error would come out.
So, I don't know how to reproduce this error. I have many vqmods installed.

Active Member

Posts

Joined
Sun Apr 22, 2012 5:49 pm

Post by OSWorX » Thu Oct 09, 2014 6:43 pm

frankleng wrote:
ADD Creative wrote:The problem looks to be:

Code: Select all

product_id ='60'"'
However I can find no SQL queries in the 1.5.5 code matching your error, so look like it's a problem with a modification.
Thanks. Do you mean a vqmod caused this problem?
It will be hard for me to find the solution. I don't know when this error would come out.
So, I don't know how to reproduce this error. I have many vqmods installed.
Sorry, but I do not understand where the problem is?!
Simply search with a qualified editor for:

Code: Select all

SELECT date_end FROM
in all files you have on your server / shop.
May need a few seconds, but you will find that phrase.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by frankleng » Thu Oct 09, 2014 7:04 pm

Simply search with a qualified editor for:

Code: Select all

SELECT date_end FROM
in all files you have on your server / shop.
May need a few seconds, but you will find that phrase.
I'm a little lucky. It takes me little time to find it in a mod,
http://www.opencart.com/index.php?route ... _license=0

Code: Select all

<?php
class ModelModuleSpecialPriceCountDown extends Model {
	
	public function getSpecialPriceEndData($product_id) {
		if ($this->customer->isLogged()){
			$customer_group_id = $this->customer->getCustomerGroupId();
		} else {
			$customer_group_id = 0;
		}
		
		$sql = "SELECT date_end FROM " . DB_PREFIX . "product_special 
				WHERE product_id ='" . $product_id . "' AND date_start <= NOW() AND date_end >= NOW() ORDER BY priority ";
		if ($customer_group_id){
			$sql .= " AND customer_group_id ='" . $customer_group_id . "'";
		}
		
		$sql .= "LIMIT 0,1";
		
		$query = $this->db->query($sql);
		
		if ($query->num_rows){
			return $query->row['date_end'];
		} else {
			return 0;
		}		
			
	}	
}
?>
i'm not sure it's this mod triggered the error, It's appreciated if you can tell me the solution. Thanks.

Active Member

Posts

Joined
Sun Apr 22, 2012 5:49 pm
Who is online

Users browsing this forum: No registered users and 40 guests