Page 1 of 4

shoppingcart integration done

Posted: Wed 16. Feb 2005, 17:54
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

Posted: Thu 17. Feb 2005, 10:28
by brans
*edit*
great thing ;-)

Posted: Thu 17. Feb 2005, 11:57
by marcus@localhorst
oke, i'm registered.
i will do some tests today.
m.

Posted: Tue 22. Feb 2005, 16:07
by marcus@localhorst
something new... see first thread.

Posted: Thu 24. Feb 2005, 10:43
by marcus@localhorst
whats up?
does everyone test this. is it soo bad?! :shock:
please tell me...

Re: shoppingcart integration done

Posted: Thu 24. Feb 2005, 14:27
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

Posted: Thu 24. Feb 2005, 14:48
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 ;-)

Posted: Wed 22. Jun 2005, 06:55
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

Posted: Wed 22. Jun 2005, 09:48
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

Posted: Wed 22. Jun 2005, 09:56
by trip
Hi
thanks for the update....
much appreciated

TriP

Posted: Sat 25. Jun 2005, 13:42
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

Posted: Sun 26. Jun 2005, 14:13
by marcus@localhorst
no, not testet ;-(

Posted: Wed 6. Jul 2005, 22:45
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....


:)

Re: shoppingcart integration done

Posted: Tue 19. Jul 2005, 22:23
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

Posted: Wed 20. Jul 2005, 04:14
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