Post by jmer1234 » Wed Aug 31, 2011 12:41 am

Cannot seem to be able to edit the customers from the Customer List page. If I find an order that the customer has made, I can click on the customer's name link to get to the customer edit page, but if I am trying to add registered customers to special groups, I do not want to have to track down orders they have made to be able to edit their group.

Newbie

Posts

Joined
Fri Aug 26, 2011 2:48 am

Post by jmer1234 » Wed Aug 31, 2011 7:31 am

Cannot seem to be able to edit the customers from the Customer List page. If I find an order that the customer has made, I can click on the customer's name link to get to the customer edit page, but if I am trying to add registered customers to special groups, I do not want to have to track down orders they have made to be able to edit their group.
Updated from svn, uploaded to server and issue is corrected.

Newbie

Posts

Joined
Fri Aug 26, 2011 2:48 am

Post by adwordsvouchersshop » Wed Aug 31, 2011 8:51 pm

hello, there is a small problem under the affiliate section on opencart 1.5.1
it has to do with the file catalog/model/affiliate/affiliate.php
and the sql when the affiliate tried to change the payment and selects continue gets the following error:

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 'WHERE affiliate_id = '1'' at line 1
Error No: 1064
UPDATE affiliate SET tax = '', payment = 'cheque', cheque = '', WHERE affiliate_id = '1'

New member

Posts

Joined
Fri Mar 11, 2011 7:00 am

Post by Suburban » Wed Aug 31, 2011 11:29 pm

i use the options menu to have my customers select a size (small, medium, large). This field is mandatory.
I don't want this option to increase the price, so when creating the options no price adjustment is added.

when adding my product and size to the cart the price is 0,00 $. It seems that using this option overwrites the standard price. (when i set the option to for instance: size small = +15.00 $, the price of my product when selecting small is 15.00$ and not the normal price of 13.00 + 15.00 = 28.00 $).

see here: http://www.platenkelder.nl/shop/index.p ... duct_id=50

Newbie

Posts

Joined
Wed Aug 31, 2011 11:23 pm

Post by uksitebuilder » Thu Sep 01, 2011 3:24 am

What value do yu have in System - Localisation - Currencies for the Euro ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by united » Thu Sep 01, 2011 8:12 am

Bug causes download files with spaces in the filename to be get the filename truncated at the occurrence of the first space. (See http://forum.opencart.com/viewtopic.php ... 07#p191507)

Fix is to change catalog/controller/account/download.php line 174 from:

header('Content-Disposition: attachment; filename=' . ($mask ? $mask : basename($file)));

to:

header('Content-Disposition: attachment; filename="' . ($mask ? $mask : basename($file)) . '"');


(i.e. Add double quotes around the filename value).

User avatar
Newbie

Posts

Joined
Sun Aug 21, 2011 9:48 am
Location - San Diego, California

Post by Suburban » Thu Sep 01, 2011 4:52 pm

uksitebuilder wrote:What value do yu have in System - Localisation - Currencies for the Euro ?
i have: 1.00000000 for Euro.
and
0.61260003 - GBP
1.00000000 - USD

Newbie

Posts

Joined
Wed Aug 31, 2011 11:23 pm

Post by uksitebuilder » Thu Sep 01, 2011 10:14 pm

It's not a bug, please see http://www.designs.org.uk/hp-lp3065

I added options of

small + 15
medium + 25
large + 35

they are correctly added to the basket.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by i2Paq » Thu Sep 01, 2011 11:18 pm

united wrote:Bug causes download files with spaces in the filename to be get the filename truncated at the occurrence of the first space. (See http://forum.opencart.com/viewtopic.php ... 07#p191507)

Fix is to change catalog/controller/account/download.php line 174 from:

header('Content-Disposition: attachment; filename=' . ($mask ? $mask : basename($file)));

to:

header('Content-Disposition: attachment; filename="' . ($mask ? $mask : basename($file)) . '"');


(i.e. Add double quotes around the filename value).
You should NEVER! use spaces in file-names on the web.

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 JNeuhoff » Thu Sep 01, 2011 11:55 pm

uksitebuilder wrote:It's not a bug, please see http://www.designs.org.uk/hp-lp3065

I added options of

small + 15
medium + 25
large + 35

they are correctly added to the basket.
Actually, there might be a bug. I managed to reproduce it by entering nothing (instead of 0) into the option value prices, only then did it show up as a bug!

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 united » Fri Sep 02, 2011 3:57 am

i2Paq wrote:You should NEVER! use spaces in file-names on the web.
LOL! dude, it's not 1994 any more. And anyhow this bug was already fixed by OC developers and checked in. So if you get latest code from Subversion or as of next release you can use spaces just like any other character. And you can probably use 1,000's of other characters just fine too, which the interwebs have been supporting for years now, thanks to proper escaping/conversion functions. In other words, web standards and browsers have come a long way and the allowed ranges of characters are well defined nowadays and all you have to do is use the proper conversion/escape function (e.g. urlencode()) for the context and then things work very well ;) Though having seen this code I don't think it does a urlencode() type of call so I would suggest not having any double-quote chars in your filenames.

User avatar
Newbie

Posts

Joined
Sun Aug 21, 2011 9:48 am
Location - San Diego, California

Post by fido-x » Fri Sep 02, 2011 9:38 am

i2Paq wrote:You should NEVER! use spaces in file-names on the web.
Agreed!
united wrote:LOL! dude, it's not 1994 any more. And anyhow this bug was already fixed by OC developers and checked in. So if you get latest code from Subversion or as of next release you can use spaces just like any other character. And you can probably use 1,000's of other characters just fine too, which the interwebs have been supporting for years now, thanks to proper escaping/conversion functions. In other words, web standards and browsers have come a long way and the allowed ranges of characters are well defined nowadays and all you have to do is use the proper conversion/escape function (e.g. urlencode()) for the context and then things work very well ;) Though having seen this code I don't think it does a urlencode() type of call so I would suggest not having any double-quote chars in your filenames.
There are 2 sides to this, server and client (customer).

While the server can "serve" a page that contains spaces in the url by "urlencoding" names, the same is not true from the customer's perspective (the client side). For example, I can't enter a url of "http://www.domain.com/Product name" in the browser's address field, otherwise I get "Page not found" error. I (as the customer) have to manually "urlencode" this to "http://www.domain.com/Product%20name".

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 i2Paq » Fri Sep 02, 2011 1:27 pm

united wrote:
i2Paq wrote:You should NEVER! use spaces in file-names on the web.
LOL! dude, it's not 1994 any more.
No, it is 2011 and it is still NOT advised to use spaces in filenames, but if you are stupid to do so, please do.
You are probably the same person who uploads a file called whatever.JPG and then complaints that whatever.jpg is not showing.
And anyhow this bug was already fixed by OC developers and checked in. So if you get latest code from Subversion or as of next release you can use spaces just like any other character. And you can probably use 1,000's of other characters just fine too, which the interwebs have been supporting for years now, thanks to proper escaping/conversion functions. In other words, web standards and browsers have come a long way and the allowed ranges of characters are well defined nowadays and all you have to do is use the proper conversion/escape function (e.g. urlencode()) for the context and then things work very well ;) Though having seen this code I don't think it does a urlencode() type of call so I would suggest not having any double-quote chars in your filenames.
It is NOT a bug, this fix is for stupid people like you who think that because they want it they should get it. The fix is in OpenCart for something that is well known to everyone who knows his ways around with php, you probably not :bash:

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 united » Sat Sep 03, 2011 3:40 am

i2Paq wrote: It is NOT a bug, this fix is for stupid people like you who think that because they want it they should get it. The fix is in OpenCart for something that is well known to everyone who knows his ways around with php, you probably not :bash:
i2Paq, wow sounds like you have some serious emotional issues! perhaps you should consider reading up a little on net etiquette, or taking some anger management classes?

User avatar
Newbie

Posts

Joined
Sun Aug 21, 2011 9:48 am
Location - San Diego, California

Post by united » Sat Sep 03, 2011 4:20 am

fido-x wrote: There are 2 sides to this, server and client (customer).
While the server can "serve" a page that contains spaces in the url by "urlencoding" names, the same is not true from the customer's perspective (the client side). For example, I can't enter a url of "http://www.domain.com/Product name" in the browser's address field, otherwise I get "Page not found" error. I (as the customer) have to manually "urlencode" this to "http://www.domain.com/Product%20name".
Your example does not apply to how file downloads are done in opencart. Customer will never have to manually "urlencode" the link to the download product files. In fact you would not want them to do that in the first place, because the file should only be accessible once it has been purchased, and the download then has to go through the controller so it can be tracked whether the download request is coming from the purchaser and how many times it has been downloaded.

So OpenCart provides the url already, customer doesn't have to do anything, and even that url is not a direct link to the file. The download link just calls the controller, which then directly provides the file by means of of issuing a "Content-Disposition: attachment" http header and the file contents. So there is actually no html involved at that point - it is pure http (for those of you who actually know the difference).

So, despite people desperately hanging on to their old fashioned beliefs that spaces are "always" bad - the fact is that in some contexts -- i.e. where someone might actually have to manually urlencode a url, spaces should be avoided -- however in many other contexts this is not the case at all.

As is usual when self-proclaimed experts say something must "always" be done a certain way (and anyone who disagrees with them must of course be stupid), they usually don't have a particularly broad understanding of much of anything.

User avatar
Newbie

Posts

Joined
Sun Aug 21, 2011 9:48 am
Location - San Diego, California

Post by fido-x » Sat Sep 03, 2011 12:24 pm

united wrote:Your example does not apply to how file downloads are done in opencart.
I wasn't referring to downloads. If you read what I said:
fido-x wrote:While the server can "serve" a page that contains spaces in the url by "urlencoding" names...
Note the word "page". I didn't refer to downloads at all. For that matter, neither did you.

What I was referring to was the practice of using of spaces in SEO keywords. Something that many people do, and then complain about "Page not found" errors.

I've been using OpenCart for over 3 years, providing downloadable modules to the community. Do you really think that I don't know how the download system works?

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 united » Sat Sep 03, 2011 1:40 pm

fido-x wrote: Note the word "page". I didn't refer to downloads at all. For that matter, neither did you.
Really? Well sounds like you need to actually read the thread. My first post (about 10 posts up from this) was quite clearly about download files.
fido-x wrote: What I was referring to was the practice of using of spaces in SEO keywords. Something that many people do, and then complain about "Page not found" errors.

I've been using OpenCart for over 3 years, providing downloadable modules to the community. Do you really think that I don't know how the download system works?
That's great, though a little off-topic since no one asked about that.

User avatar
Newbie

Posts

Joined
Sun Aug 21, 2011 9:48 am
Location - San Diego, California

Post by i2Paq » Sat Sep 03, 2011 5:19 pm

united wrote:i2Paq, wow sounds like you have some serious emotional issues! perhaps you should consider reading up a little on net etiquette, or taking some anger management classes?
united wrote:That's great, though a little off-topic since no one asked about that.
You are so friendly and with your attitude you wonder why no one wants to help you anymore?

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 rph » Sun Sep 04, 2011 12:38 am

To get back on topic a bit, for the country cache we have

Catalog

Code: Select all

if (!$country_data) {
    $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE status = '1' ORDER BY name ASC");
    
    $country_data = $query->rows;
        
    $this->cache->set('country', $country_data);
} 
Admin

Code: Select all

if (!$country_data) {
    $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country ORDER BY name ASC");
    
    $country_data = $query->rows;
            
    $this->cache->set('country', $country_data);
} 

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by JNeuhoff » Sun Sep 04, 2011 1:02 am

rph wrote:To get back on topic a bit, for the country cache we have

Catalog

Code: Select all

if (!$country_data) {
    $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE status = '1' ORDER BY name ASC");
    
    $country_data = $query->rows;
        
    $this->cache->set('country', $country_data);
} 
Admin

Code: Select all

if (!$country_data) {
    $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country ORDER BY name ASC");
    
    $country_data = $query->rows;
            
    $this->cache->set('country', $country_data);
} 
For the Admin, in file admin/model/localisation/country.php, change it to:

Code: Select all

			.....
			$country_data = $this->cache->get('admin_country');
		
			if (!$country_data) {
				$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country ORDER BY name ASC");
	
				$country_data = $query->rows;
			
				$this->cache->set('admin_country', $country_data);
			}
			.....
It's a different query compared to the frontend, therefore needs a different cache name.

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

Who is online

Users browsing this forum: No registered users and 9 guests