[Testing] Shopping cart extension/ensemble
This is a closed discussion with 7 replies, filed under Extensions.
Search
This is great, andrrr.
I haven’t tested it but I have a question though: Is it really necessary to hack the core to get things working?
This is awesome… I haven’t tested, but for sure I will!!!
I quickly tested the ensemble, It it seems to work fine! Very simple… A very good starting point for me to understand how to build my own shopping cart… I will spend some time exploring it. Thanks a lot!
Cheers!
Is it really necessary to hack the core to get things working?
The FrontendParamsResolve
delegate is there for the same purpose.
@Nils, @nickdunn
The FrontendParamsResolve delegate starts before Events processing. In this case cart’s page params will not show actual cart status after Event call.
The only alternative I can see here is to completely drop page params feature and make use of a data source. As a result we could not do filtering shop items by $cart-items (we need it at cart’s page) and should save to session more data about added items (item title and price at least). Such a dilemma.
At my point of view usability of a page params feature costs that hack.
Please, correct me if i miss something.
@brunopinho78 You’re welcome) I think i’ll release it in a few days.
@brunopinho78
Have you discoverd some new uses?
@andrrr
Do the new delegates and tweaks in version 2.0.7 mentioned here make this extension possible without the hacks?
@newnomad
The extension is already available without any hacks. Check here, please
p.s. I think it’s better to close or delete this thread as it is not relevant any more
Create an account or sign in to comment.
Hi
I’d like to ask a community to test my shopping cart extension and ensemble.
It’s quite raw and not fully tested by me, so, I don’t want to publish it at Extensions/Ensembles sections yet.
Nevertheless, it looks like extension works well in the ensemble.
Standalone Shopping Cart extension
Installation
First of all, the extension requires one small hack of class.frontendpage.php. You should add ‘ManipulatePageParameters’ delegete to it:
/symphony/lib/toolkit/class.frontendpage.php
After line 233:
Add:
Thats all with hacking) After that install extension as usual.
Then go to System/Preferences and choose a Price field. Extension will take price values for calculations from that field (This implies, that you already have section with appropriate fields for a shop).
Usage
After installation you’ve got a Shopping Cart event, datasource, and new page params
Event
In theory Event should accept both GET and POST request, but I’ve been tested it with GET only.
Accepted variables are:
Say, if you want to add one item to Cart, your GET request should be:
For dropping item from cart:
For recalculating:
After processing event returns event XML:
Data Source
It’s quite simple here:
Page parameters
Extension append three new parameters to a page:
If Cart is empty, extension returns just $cart-items = ‘empty’
Looks like that’s all instructions. Anyway, I think, for start it’s better to install and dig Shopping Cart Ensemble for make things clearer.
Any questions and suggestions are welcome.