Page 1 of 1

categories ?

Posted: 30 Jun 2017, 16:01
by BonoboMagno
How categories costrain are thinked? Did you use closureTable on it ?

Re: categories ?

Posted: 01 Jul 2017, 10:48
by aimeos
Can you explain a bit more in detail what you mean?

Re: categories ?

Posted: 03 Jul 2017, 08:41
by BonoboMagno
aimeos wrote:Can you explain a bit more in detail what you mean?
(id , parent_id, order)
just ad a depth column and you have a closure table :)
This mean that parent_id can be also grandparent (with depth >0 ) and is parent on depth ==0.

It's faster becouse of less join on calling a product.
I can make a PR when i finish with that, or if you like the idea add it ^_^

ps.
did you changed the admin panel?
i like the new one

Re: categories ?

Posted: 03 Jul 2017, 10:55
by aimeos
Categories are stored in a nested set, which is extremely fast when retrieving tree structures. We've added a "level" and a "parentid" column as auxiliary data to have more control when filtering for categories but they are not essential for the tree.

Yes, we've updated the admin demo for the upcoming 2017.07 release. The biggest change is the rewritten admin interface which is much more clearly arranged and more pleasant for the editor's eye than before. Your feedback for further improvements is always welcome :-)

Re: categories ?

Posted: 03 Jul 2017, 13:25
by BonoboMagno
aimeos wrote:Categories are stored in a nested set, which is extremely fast when retrieving tree structures. We've added a "level" and a "parentid" column as auxiliary data to have more control when filtering for categories but they are not essential for the tree.

Yes, we've updated the admin demo for the upcoming 2017.07 release. The biggest change is the rewritten admin interface which is much more clearly arranged and more pleasant for the editor's eye than before. Your feedback for further improvements is always welcome :-)
Ups, i opened the wrong table, so didnt see nleft nright of nested set :D
Nested is good as closure , so is fine for me.

For the interface, why you don't start use webpack? Of course there is no real need on backoffice, but a standard way to bundle all, can easly help the frontend develop.

Btw, is easy to customize.
I read about a jsonadm, but cant find any reference on api to call. there is an endpoint ?
Did i need to make a custom session handling? (i will try with dingo api in that case)
thankyou :)

Re: categories ?

Posted: 03 Jul 2017, 14:10
by BonoboMagno
i answer myself:
there is a routes.php on /vendor/aimeos/aimeos-laravel :D

add.
Oh, you follow jsonapi v1 standard
That's cool!

Re: categories ?

Posted: 03 Jul 2017, 16:16
by aimeos
BonoboMagno wrote: For the interface, why you don't start use webpack? Of course there is no real need on backoffice, but a standard way to bundle all, can easly help the frontend develop.
We decided to make Aimeos as easy as possible to attract as much developers as possible. Thus, the tool chain must be short and simple to be understood by everyone. In fact, Aimeos currently only requires understanding HTML5, CSS3, JQuery and OO-PHP. The last one is probably the biggest problem for most developers (Decorators? What?)
BonoboMagno wrote: I read about a jsonadm, but cant find any reference on api to call. there is an endpoint ?
Did i need to make a custom session handling? (i will try with dingo api in that case)
The jsonadm endpoint depends on the route/site and isn't fixed. If you want to use the JsonAdm API from an external application, you have to configure the endpoint depending on the output of

Code: Select all

route('aimeos_shop_jsonadm_options', ['site' => $site]);
For use in the Aimeos PHP templates, you should use instead

Code: Select all

$jsonTarget = $this->config( 'admin/jsonadm/url/options/target' );
$jsonCntl = $this->config( 'admin/jsonadm/url/options/controller', 'Jsonadm' );
$jsonAction = $this->config( 'admin/jsonadm/url/options/action', 'options' );
$jsonConfig = $this->config( 'admin/jsonadm/url/options/config', [] );
$this->url( $jsonTarget, $jsonCntl, $jsonAction, ['site' => $site], [], $jsonConfig ) );
The OPTIONS request will return all available resources. Only use that list and never hard-code any of them in your code!

You don't have to care about the session handling as all JsonAdm calls are stateless. Using it from an external application requires to be logged in.

Re: categories ?

Posted: 04 Jul 2017, 10:18
by BonoboMagno
You don't have to care about the session handling as all JsonAdm calls are stateless. Using it from an external application requires to be logged in.
I was talking about jwt, hard to have authentificated request without it in a stateless call :)
But in fact you use laravel middleware, so i can quickly add it without touching aimeos

Sorry for asking so many question :)
Closed topic for me, thanks again!

Re: categories ?

Posted: 05 Jul 2017, 07:39
by aimeos
You are welcome!
If you like Aimeos, spread the word :-)