shoppingcart integration done

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
ch
Posts: 27
Joined: Tue 14. Jun 2005, 20:28
Location: Erfurt

Post by ch »

Hi, thanks for your answer, but one more question.... I try to follow the configuration instruction from Markus... But I have a problem with the tags... I created a new article for a product an inserted the tag.... but if I test the site, the tag won't be resolved (the complete tag-text is shown).
Is there a tutorial or so for this mod?

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

Post by jsw_nz »

Well.....

Marcus's readme is basically about it....for now

Sounds like a folder structure issue......
so 'double check' the readme.........frontend_init, frontend_render folders get files...so you will need to drag and drop respective cart.php inside each.

also do not forget to include the path to the mod in index.php
:)
ch
Posts: 27
Joined: Tue 14. Jun 2005, 20:28
Location: Erfurt

Post by ch »

Hi,

ok, now I'm a step forward... The copying and include of all necessary files is done... But I see now the following before my website appears:

Array
(
[frontend_user] => Array
(
[id] => 0
[login] => guest
[name] => Guest
)

[session_is_set] => 1
)
Array
(
)

Any idea, what the problem is...?

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

Post by ch »

... and as addition... I ignored the output before my actual html-site...
the resolving of the replacement tag works fine...
now I used (following the instruction) the cart with {CART_SHOW}
and I got the following error-msg:

Fatal error: Call to undefined function: wf_get_info() in /var/www/htdocs/hp_600jahrfeier/include/inc_module/mod_cart/inc_lib/cart.class.php on line 73

Wau - that's a problem...

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

Post by jsw_nz »

Hi ch,

Yes I came across that error as well.....
basically it is a function call to something outside of wcms proper, which is found in the that cart.class file, .....so just comment out places where you see wf_get_price, ie:

// $this->itemprices[$itemid] = wf_get_price($itemid,$qty);

BTW, you might want to tweak the session instantiation a bit. I noticed that session data was showing up only after a page refresh.....Marcus had mentioned wee bugs...so in frontend_init/cart.php

change:

Code: Select all

///--- create the CART VAR
$cart =& $_SESSION['wfcart']; // point $cart to session cart.
if(!is_object($cart)) $cart = new wfCart(); // if $cart ( $_SESSION['cart'] ) isn't an object, make a new cart
to:

Code: Select all

global $cart;
$cart =& $_SESSION['wfcart']; // point $cart to session.
if(!is_object($cart)) { // make a new cart
     $cart = new wfCart(); 
     $cart =& $_SESSION['wfcart']; //point $cart to session.
     }
then move the print_r($_SESSION); to a position below the above code...

I have been making modifications to Marcus's setup and am now able to add the article image into the cart itself...plus some other stuff (options, link to original article, etc). Wanted to ask that when once completed you might want to test run it...

Always looking for new test enviornments... :D
mortiferus
Posts: 9
Joined: Sun 24. Jul 2005, 22:19

Post by mortiferus »

hey ho, ....

ich glaub ich könnte das gut gebrauchen, aber wie wo was? wo bekomm ich das denn her und wie installiere ich das teil????

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

Post by ch »

Hi jsw_nz,

many thanks for your support! In my existing config files there is the mentioned text already a comment - and so I havn't solved the problems...

Due to the fact, that I'm a little bid under pressure, I followed the hint with the quick cart shop (http://opensolution.org/?p=productsQuickCart) in this article... I integrated this one with iFrame and (after some modifications in the template of quick cart) it works fine.

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

Post by ch »

[quote="mortiferus"]hey ho, ....

ich glaub ich könnte das gut gebrauchen, aber wie wo was? wo bekomm ich das denn her und wie installiere ich das teil????

please help[/quote]

Hi, steht alles auf Seite 1 von diesem Beitrag.... habe es selbst aber nicht so richtig zum laufen gebracht :-(.... Meine Alternative: http://opensolution.org/?p=productsQuickCart, Integration mit IFrame... steht aber auch bereits so im Beitrag beschrieben.

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

Post by jsw_nz »

Hi ch,

I do understand the need to be practical....the wcms cart is really quite basic at this stage. I suppose the opensolution cart has a few plugins...one of which would be options. Ie if ordering an item, choosing a color or size.....etc. My own project requires such.

With regards to the Iframe getting things to work....am familiar with this strategy..however the scrollbars are a nuisance sometimes, at least for me.

Have been thinking about how wcms offers new possibilities with frontend_init and render.....frontend_init intercepting requests and frontend_render handling replacement tags: For Example {CUSTOM_SCRIPT} could be buffered and handled this way:

Code: Select all

function myCustomScript(){
    ob_start();
    include("include/myCustomScript.php");
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}

if(!( strpos($content["all"],'{CUSTOM_SCRIPT:  ....bla,bla,bla
I have had success writning custom forms this way where variables are successfully passed, while at the same time the rest of wcms gets rendered...just a thought...to get around the pesky Iframe strategy, however your app may be a wee bit more involved than a simple runtime like this
:)
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

still under construction...client is slow to provide materials...anyway...
wanted to ask if some of the community would be willing to walk through it and post an order (it is non-SSL) - basically an itemised enquiry scheme at this stage.....not sure if the email response is working properly and that it is not treated as spam. Guessing there are more a few more issues/bugs to be resolved.

Cheers... :)
Last edited by jsw_nz on Mon 25. Dec 2006, 20:50, 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 »

:shock:

g g ggg ggrr-eat!
I'm impressed! good work!
greetings
marcus
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

Hey! Great work jsw_nz! :D
I placed a test order and the only thing I found is that when someone tries to put an accent in his City name or elsewhere you are not taken anywhere. You could put an error message in there hopefully, otherwise... the user might think the system is mnot working.
Also I encounterred the problem that if I use a comma in my address... it is not being taken, and I get stuck.
Hope this may help you put the final touch to your awesome projeckt :wink:

BTW: The "Confirmation of Order" email message, came in along real nice, in HTML with the same look and feel as on your site. Great Work!!!
jsw_nz wrote:still under construction...client is slow to provide materials...anyway...
wanted to ask if some of the community would be willing to walk through it and post an order (it is non-SSL) - basically an itemised enquiry scheme at this stage.....not sure if the email response is working properly and that it is not treated as spam. Guessing there are more a few more issues/bugs to be resolved.

http://www.gripfast.co.nz/index.php?balls_rugby_union

Cheers... :)
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Cheers guys....

btw Marcus, thanks to you, really, since I am building on your efforts. I tried to maintain your architecture, but have added new REP tags....so some of the stuff is new way to do things. I bypasssed next/previous article for cart_location [0,1,2,3]...all set in config file....uses wcms aliases. Do plan to send the code your way, if you want to host. All labels (from A to Z) are controlled from cart.conf.php...so changing from english to german would be easy. Also the various boxes, etc are 'editable' so easy to modify/customize inside html editor (dreamweaver)

StudioZ, thanks for the heads up...will need to tweek the reg expressions on the forms fields....knew i was missing something.

There are still issues....namely computing shipping costs (left room for this), conversion of currencies (should be easy), not 'multi-lingual yet' and to the best of my understanding....SSL, yet to be completed for wcms. Yet a step in right direction. :) :)
Morphix
Posts: 1
Joined: Wed 17. Aug 2005, 00:32

Post by Morphix »

I am really trying to learn web tech's.....

Just wanted to add I think the site is fantastic and I hope that development continues with the shop/... :D :wink:
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

props to jsw_nz! :D

he's our man! ;)
Completeness is reached through subtraction, not through addition
Post Reply