Page 1 of 1
opencart V0.7 Availability
Posted: Sat Mar 24, 2007 9:29 am
by ssinfiel
Hi There,
I am waiting in anticipation for the release of this version, as it has many cool features that I require. Can you give me some ETA of its availability, I noted two days ago it was suppose to be released however no further information has happened.
Regards
Steven
Re: opencart V0.7 Availability
Posted: Sat Mar 24, 2007 10:58 pm
by Daniel
Actually its finished and I have being readying its release.
I will try to get it done today.
Re: opencart V0.7 Availability
Posted: Sun Mar 25, 2007 8:46 am
by Daniel
I need another day on this.
I'm going to change the code for the services to make the coding better structured.
Re: opencart V0.7 Availability
Posted: Tue Apr 10, 2007 10:32 pm
by Seguer
Do we have another ETA on 0.7?
Re: opencart V0.7 Availability
Posted: Wed Apr 11, 2007 5:30 am
by Daniel
Before the end of this week!
I have changed the framework into OOP style code.
Now I'm stuck on 2 things.
1. Use a request wrapper class or not.
2. Use a data container for config values or use constants.
Re: opencart V0.7 Availability
Posted: Wed Apr 11, 2007 6:35 am
by Seguer
If time permits you should use a wrapper class and a data container for config values
Re: opencart V0.7 Availability
Posted: Thu Apr 12, 2007 4:09 am
by Daniel
Thank you!
Re: opencart V0.7 Availability
Posted: Wed Apr 18, 2007 5:32 am
by d77
Been pretty quiet lately? Lots of notes in the forum on various bugs and I am applying alot of the fixes to get it up and running... but also wondering about the next release... should I put alot of effort in, or is there a big dif with 0.7... ie. is the database compatible?
Re: opencart V0.7 Availability
Posted: Wed Apr 18, 2007 7:03 am
by Daniel
Hi,
Yes I ran into some problems and had to find a good solution. I'm going over all the code now updating it.
It now has the request class and uses a lazy load registry / factory patern for loading files.
I need to go over all the pages to update the code.
Re: opencart V0.7 Availability
Posted: Wed Apr 18, 2007 11:16 am
by d77
Great, can't wait
Re: opencart V0.7 Availability
Posted: Thu Apr 19, 2007 10:10 pm
by Daniel
I have implemented a request wrapper for v0.7 which is currenty works like this:
$request->get('name');
$request->get('name', 'post');
$request->get('country_id', 'get');
$request->get('HTTP_HOST', 'server');
I'm wondering which is the best way. It could also be done like this:
$request->getPost('name');
$request->getGet('country_id');
$request->getServer('HTTP_HOST');
or:
$post =& $request->get('post');
$get =& $request->get('get');
$cookie =& $request->get('cookie');
$files =& $request->get('files');
$server =& $request->get('get');
Can any one recommend which is the best method to use?
Re: opencart V0.7 Availability
Posted: Thu Apr 26, 2007 2:08 pm
by chomp
Why not just access $_SERVER, $_POST, $_COOKIE, and $_GET? Seems silly to call $request->post('value') instead of just $_POST['value'] not to mention the extra coding (maybe even overhead) of a wrapper. Now it might be a good idea to add helpers for each of these super vars types. Something like set_cookie($array), safe_post($_POST['prevent_xss']).
Re: opencart V0.7 Availability
Posted: Fri Apr 27, 2007 5:25 am
by Daniel
I don't feel using a wrapper is good either, but I'm trying to set up the next version from an OOP perspective.
When using OOP globals should not really be used and should come from a source such as a request class.
I have decided to go with this style:
$post_info =& $request->get('post');
$get_info =& $request->get('get');
$cookie_info =& $request->get('cookie');
$files_info =& $request->get('files');
$server_info =& $request->get('server');
Re: opencart V0.7 Availability
Posted: Sat Apr 28, 2007 8:09 pm
by chomp
Re: opencart V0.7 Availability
Posted: Sat Apr 28, 2007 8:34 pm
by Daniel
I was thinking of doing an code ignitor style class loader. I think its called a dependacy injector pattern.
The only problem is everything in the pages has to be like this:
$this->template->set('entry_name', $this->language->get('entry_name'));
Re: opencart V0.7 Availability
Posted: Sun Apr 29, 2007 5:49 am
by chomp
are you talking about ci or open cart?
from what i gather, pages is the same thing as a view (MVC). am i right? i'm not sure what exactly the problem is. are you trying to do a template controller? it could work something like this in ci
router
handles the sef url (
http://www.qcodo.com/forums/topic.php/489/1/489/ view my post at the bottom)
send to browse controller
product browse controller
$data = array
do some stuff and get results or vars to pass to view
foreach result_row as product
$data[] = load_view(prod_resutls,$product);
endforeach
$template_vars[title] = "page title";
$template_vars[contents] = join($data);
load_view(master_template,$template_vars);
Re: opencart V0.7 Availability
Posted: Sun Apr 29, 2007 6:06 am
by chomp
it should also be said that ci doesnt load a class controller unless it's in the lib folder. kind of annoying since i wanted to load classes on the fly. i did run across such a function, but don't totally know how it works, since i'm not all that familiar with php5. i think it's using an empty shell to load the class file into.
function &build($class, $name)
{
$p4a =& P4A::singleton();
$args = func_get_args();
$str_args = '$this->$name =& new $class(';
for ($i=1; $istore($this->$name);
$this->_objects[] = $this->$name->getID();
$this->$name->setParentID($this->getID());
return $this->$name;
}