shoppingcart integration done
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
shoppingcart integration done
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
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.
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
Re: shoppingcart integration done
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
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
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
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
thats was my thought.
thanks for the link the shop looks good
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
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
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
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
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
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
Hi Marcus;
Wanted to ask if you encountered this:
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,
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.
so I changed to:
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....
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
Working in dev 1.2.3 (I commneted out session_name('hashID')
If you have any insights, please post.....
Cheers,
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"]."\">
Code: Select all
<form method=\"post\" action=\"".$_SERVER['REQUEST_URI']."\">
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
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
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
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....
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....