shoppingcart integration done

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

shoppingcart integration done

Post by marcus@localhorst »

Oke

after 4 days of work i've finished a basic shoppingcart MOD fo phpwcms.
it is session based and need only one change in the corefile (index.php)
everything is made with Replacement Tags.
But attention! this is written by a PHP beginner (i work with cold fusion normally) so it's maybe the ugliest code you've ever seen and my english is not so good. but i tried to document the code as good as possible.

this is very very basic and it would be fine if someone do it better and more functional than mine (or give me some tips ;-)). oke, enought blabla here is a sample of the shop:
http://---.com/katalog.phtml
here more informations:
--...--/index.php?topic=82.msg152
and here the download:
http://www.fieldmuzick.net/

tell me what you think.
greetings marcus
Last edited by marcus@localhorst on Thu 22. Jan 2009, 22:50, edited 2 times in total.
brans

Post by brans »

*edit*
great thing ;-)
Last edited by brans on Thu 24. Feb 2005, 08:56, edited 1 time in total.
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

oke, i'm registered.
i will do some tests today.
m.
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

something new... see first thread.
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

whats up?
does everyone test this. is it soo bad?! :shock:
please tell me...
marco

Re: shoppingcart integration done

Post by marco »

This is a good start. But I prefer a more complete script like quick cart. It has all the basic features, although it runs on flat files only.

http://qc.dotgeek.org/os/index.php?p=productsQuickCart
marcus@localhorst wrote:Oke

after 4 days of work i've finished a basic shoppingcart MOD fo phpwcms.
it is session based and need only one change in the corefile (index.php)
everything is made with Replacement Tags.

tell me what you think.
greetings marcus
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

yes a complete shop-system is better for larger e-commerce-only sites. because they are specialiced for that. But I think PHPwcms is often used for smaller sites and for presentation (not only, i know ;-)) and for example I'm running a small label with some CDs and with a simple shop solution, inside phpwcms, I can presenting and sell article at once.
thats was my thought.


thanks for the link :-) the shop looks good ;-)
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Hi Marcus
any update on the shopping cart... and you have a LIVE link to show with the demo you made

regards
TriP
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

nothings new :-)
here is a sample: http://mobst.dd2636.kasserver.com/katalog.phtml

but attenzione! this shop may shows only what is possible with phpwcms.
all the text is hardcoded in the files - and the sessionbased cart is really crap :-) anyway - maybe someone will develop a similar one?

greetings marcus
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Hi
thanks for the update....
much appreciated

TriP
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Hi Marcus,

I downloaded your code and plan to take a look at it...looks like a lot of work, so much appreciated. Wanted to ask if you have tested in new dev releases, particularly where OliG has started using sessions in new ways. Might there be modifications that need to be made to your source code to accommodate.

cheers,
john :D
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Post by marcus@localhorst »

no, not testet ;-(
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Hi Marcus;

Wanted to ask if you encountered this:

Code: Select all

Call to undefined function: wf_get_info() in C:\Program Files\Apache Group\Apache2\htdocs\phpwcms_dev_123\include\inc_module\mod_cart\inc_lib\cart.class.php on line 73
I did a search for the function within my installation....and the only place the function is listed is in inc_lib/cart.class.php - basically the function is called here (not defined), ....might there be a file missing or a commented line of some sort.

Working in dev 1.2.3 (I commneted out session_name('hashID')
If you have any insights, please post.....

Cheers,
:D

UPDATE: Was able to comment out the call to the function (seems that the original source -webforce has this bug too) and was able to bypass error being thrown. Did notice that price itself is created at article level. Was hoping that price could be available more at the 'database level'...that could be accessed globally within wcms, since I have a special forms-based requirement to list all items with checkboxes, kind of like an enquiry form rather than a shopping cart proper.

.....nonetheless the system does work.

Did have one question, which is rediection after adding item. At present this is not working (might be a quirk of my local installation.

Code: Select all

<form method=\"post\" action=\"" .$_SERVER["PHP_SELF"]."\">
so I changed to:

Code: Select all

<form method=\"post\" action=\"".$_SERVER['REQUEST_URI']."\">
and is now working, refreshing to same page.....
would be nice if article display indicates that the item was added....guessing this could be added to addCart () function, simply looking for preset Sessions ($item['qty']) based on article ID....


:)
ch
Posts: 27
Joined: Tue 14. Jun 2005, 20:28
Location: Erfurt

Re: shoppingcart integration done

Post by ch »

Hi,

your shop demo is great! Exatly that what I need. And now I have some questions:

Is there any further version?
Can I use this with phpWCMS 1.2.3 DEV?
I have a problem with this replacement tag: {CART_ADD:1:11.11} - Where (Schlagtext, Einfacher Text) is it to place in?

Many thanks for your answer!

Christian
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

ch......

Yes it does work with 1.2.3 dev....with regards to the other reg tag question {}, I cannot answer, the reason being is that I am undertaking modifications to scripts to connect it to 'prices table'. Will update when I have things further along.....

NEW STUFF:
article_category
article_description (tag)
article_url (details button)
options_set_1 (dropdown_selection_list)
options_set_2 (text input)
catalogue number (uses article_subtitle - not set in stone however)
session sniffer: such that if two items (with same ID but different options) are entered, cart.class creates separate entries....

thanks to Marcus for his work to this stage.... :D
Post Reply