I've been reading all over the place about shopping carts with CMSMS, and so far, the instructions for integrating Paypal's cart with Cataloger module seems the most likely. Cataloger seems at first glance, nicely complete and developed.
I've worked with both Paypal and Mal's E carts, and have preferred the latter for its features and extensive documentation. I thought I'd work on using it with Cataloger, instead.
This may be a no-brainer, I haven't tried, and this will be the first dynamic site I've ever tried to use it with. I'm tired from a long day of trying other things! But I'm going to start messing with it, and will try to come back here and let people know how I'm doing. I welcome advice, and also anyone who wants to chat with me about it. I don't know much! If you don't, either, I won't give you a hard time, and if you know more than me, well great.
Here's what Mal's docs have to say about using their cart with a dynamic site:
http://www.mals-e.com/help42.php
If you're interested, please post after me. Also, if you know an easier way to just get a reasonable shopping cart on a CMSMS site, I'll be delighted to cease and desist!
Hope I'm not stepping on any toes, don't mean to, just trying to get the job done and the paycheck in the bank.
Integrating Mals-E Cart with Cataloger
Re: Integrating Mals-E Cart with Cataloger
Another bit:
http://projects.jesseheap.com/all-proje ... e-with-php
This is a tutorial for setting up a summary cart on a site with php. I'm the very barest novice with php, (sorta grasp what a variable is...) so we'll see how this goes.
So far, all that's really happened is that I've explored the Cataloger module, set up one clear category, and one complete item. I've explored and understood the paypal/cataloger integration post. We'll see.
http://projects.jesseheap.com/all-proje ... e-with-php
This is a tutorial for setting up a summary cart on a site with php. I'm the very barest novice with php, (sorta grasp what a variable is...) so we'll see how this goes.
So far, all that's really happened is that I've explored the Cataloger module, set up one clear category, and one complete item. I've explored and understood the paypal/cataloger integration post. We'll see.
Re: Integrating Mals-E Cart with Cataloger
mran,
Mals-e cart looks ok. For what I quickly scanned, you still have to pay per month a fee. Is it not better to have something designed specially to CMSMS? The following is addressing this:
http://forum.cmsmadesimple.org/index.php/topic,17018.0.html.
But it would help if you fund something for this.
I just put this here, since it seems that quite a number of persons are currently preparing/building a cart solution. It would be a pity if there would be multiple alternatives (with each small support) iso a starting version that can be extended more easily since its written with CMSMS as a basis.
Mals-e cart looks ok. For what I quickly scanned, you still have to pay per month a fee. Is it not better to have something designed specially to CMSMS? The following is addressing this:
http://forum.cmsmadesimple.org/index.php/topic,17018.0.html.
But it would help if you fund something for this.
I just put this here, since it seems that quite a number of persons are currently preparing/building a cart solution. It would be a pity if there would be multiple alternatives (with each small support) iso a starting version that can be extended more easily since its written with CMSMS as a basis.
Re: Integrating Mals-E Cart with Cataloger
I agree that something integrated into CMSMS is the ideal. I'm glad people are working on that, but right at the moment, I've got to get something out there so my client can go live this week, so I'm working on this.
Mal's has a paid version, but the free version has worked for all my needs for years, and has lots of power left over. It's extremely customizable, and also very well documented. There are all sorts of help files and tutorials out there for everyone from total newbie at HTML forms (which I was when I found Mal's) to advanced coders building complex and dynamic sites.
I've seen one person who has built some kind of integration of Mal's into Wordpress. I'd love to see something similar for us here.
But! We're still a ways off, and I've got a site to finish. I've done some work and had some successes, and I'll post what I've got so far, perhaps it will help someone else. And, since I'm not quite where I want to be yet, I'll post my questions at the end of this and maybe someone will help me.
What I have so far:
How to make Buy Now and Show Cart buttons in your Cataloger Item template that will send to Mal's the price and other info about each item AND get your shopper back to the page they were on:
Okay. First you need an account at Mal's. http://www.mals-e.com You'll particularly need the userID, but once you're signed up over there, you're going to have that plus TWO passwords, one for getting into the settings and preferences, and one for seeing your payments.
Go ahead and log in with the first password, and click on Cart Set-Up. You can play around with the various settings, there is a LOT there, but for our purposes right now, the main thing is just to have the default settings in place for Return Link. You don't have to have the first field, the URL of your site filled in, unless you only want to have one page that people can shop from. I'm assuming you have more, so you probably can leave this blank. You can fill in the name of your site, though.
Just be sure the default button is ticked at the very bottom, where it says "A hyperlink (the default). GET request". Save changes.
Okay, back to CMSMS now. Go make a Global Content item, and call it something like "buynow." You're going to put your first form in here. Instead of some of the values of things like price, weight, etc, you're going to put your attributes like this: {$price} {$weight}. This has been covered http://forum.cmsmadesimple.org/index.php/topic,10020.msg50412.html#msg50412, but I'll spell it out a bit to keep things in one place.
You may choose to do your button differently, but it could look something like this:
You can put any attributes in you want. Shipping weight would be a good thing. That long thing with all the smarty tags in it is the return link. It'll get your shopper back from Mal's to your site to shop some more.
Next, make another Global Content item for the Show Cart button. Mine looks like this:
Now you can just call these from your Item templates.
This is all wonderful, and I really appreciate the folks who got me this far. That return link thing up there is my boyfriend's first Smarty tagl I didn't realize I was asking him to put in 20 minutes when I asked how to dynamically generate the return link.
My next goal is to have these buttons appear beside every item in the Category page. I want to have all the Items in the Category appear with the Buy button, and maybe put the Show Cart button every five items or so.
I'm just beginning with Smarty and with coding in general, so we'll see. If anyone has any tips, I'd appreciate it, might save me an hour or two.
Another thing for the wish list. The current return link tag will get the site visitor back to the exact page they came from...which is fine. But I think it would be a little slicker if they were to be sent back to the nearest Category page, if they started from an Item page.
Does that make sense? You're shopping on a page full of similar items, you click on one to get more detail, you buy it, and now you want to continue shopping. Where do you want to go? Back to the item you just bought, or back to the page full of items?
Mal's has a paid version, but the free version has worked for all my needs for years, and has lots of power left over. It's extremely customizable, and also very well documented. There are all sorts of help files and tutorials out there for everyone from total newbie at HTML forms (which I was when I found Mal's) to advanced coders building complex and dynamic sites.
I've seen one person who has built some kind of integration of Mal's into Wordpress. I'd love to see something similar for us here.
But! We're still a ways off, and I've got a site to finish. I've done some work and had some successes, and I'll post what I've got so far, perhaps it will help someone else. And, since I'm not quite where I want to be yet, I'll post my questions at the end of this and maybe someone will help me.
What I have so far:
How to make Buy Now and Show Cart buttons in your Cataloger Item template that will send to Mal's the price and other info about each item AND get your shopper back to the page they were on:
Okay. First you need an account at Mal's. http://www.mals-e.com You'll particularly need the userID, but once you're signed up over there, you're going to have that plus TWO passwords, one for getting into the settings and preferences, and one for seeing your payments.
Go ahead and log in with the first password, and click on Cart Set-Up. You can play around with the various settings, there is a LOT there, but for our purposes right now, the main thing is just to have the default settings in place for Return Link. You don't have to have the first field, the URL of your site filled in, unless you only want to have one page that people can shop from. I'm assuming you have more, so you probably can leave this blank. You can fill in the name of your site, though.
Just be sure the default button is ticked at the very bottom, where it says "A hyperlink (the default). GET request". Save changes.
Okay, back to CMSMS now. Go make a Global Content item, and call it something like "buynow." You're going to put your first form in here. Instead of some of the values of things like price, weight, etc, you're going to put your attributes like this: {$price} {$weight}. This has been covered http://forum.cmsmadesimple.org/index.php/topic,10020.msg50412.html#msg50412, but I'll spell it out a bit to keep things in one place.
You may choose to do your button differently, but it could look something like this:
Code: Select all
<form method="post" action="http://www.aitsafe.com/cf/add.cfm">
<input type="hidden" value="xxxxxx" name="userid" />
<input type="hidden" value="{$title}" name="product" />
<input type="hidden" value="{$price}" name="price" />
<input type="hidden" value="http://{$smarty.server.SERVER_NAME}{$smarty.server.SCRIPT_NAME}?page={$smarty.get.page}" name="return" />
<input type="submit" value="Buy Now" class="submit" />
</form>
Next, make another Global Content item for the Show Cart button. Mine looks like this:
Code: Select all
<form action="http://www.aitsafe.com/cf/review.cfm" method="post">
<input type="hidden" value="xxxxxx" name="userid" />
<input type="hidden" value="http://{$smarty.server.SERVER_NAME}{$smarty.server.SCRIPT_NAME}?page={$smarty.get.page}" name="return" />
<input type="submit" value="Show Cart" class="submit" />
</form>
Code: Select all
<div class="catalog_item">
<img name="item_image" id="item_image" class="left_item" src="{$image_1_url}" />
<div class="info">
{$notes}<br />
<span class="note">Height:</span> {$dimensions}<br />
<span class="note">In stock:</span> {$instock}<br />
<span class="note">Price:</span> {$price}<br />
{*eval var=$attrlist[at].key*}
{*/section*}
{global_content name='buynow'}
{global_content name='showcart'}
</div>
</div>
</div>
This is all wonderful, and I really appreciate the folks who got me this far. That return link thing up there is my boyfriend's first Smarty tagl I didn't realize I was asking him to put in 20 minutes when I asked how to dynamically generate the return link.

My next goal is to have these buttons appear beside every item in the Category page. I want to have all the Items in the Category appear with the Buy button, and maybe put the Show Cart button every five items or so.
I'm just beginning with Smarty and with coding in general, so we'll see. If anyone has any tips, I'd appreciate it, might save me an hour or two.
Another thing for the wish list. The current return link tag will get the site visitor back to the exact page they came from...which is fine. But I think it would be a little slicker if they were to be sent back to the nearest Category page, if they started from an Item page.
Does that make sense? You're shopping on a page full of similar items, you click on one to get more detail, you buy it, and now you want to continue shopping. Where do you want to go? Back to the item you just bought, or back to the page full of items?
Re: Integrating Mals-E Cart with Cataloger
Another milestone has been reached. I went crying to Samuel, and he tossed me some code for my catalog page template. This will allow a Category page to show any number of items, each with its own buy button. Here is my template:
I've tweaked the appearance a bunch to get the style how I want it, but the important bit is just where Samuel changed the $price, etc to read {$items[numloop].link}.
Code: Select all
{$notes}<span class="right">{global_content name='showcart'}</span><br />
<div class="category_items">
{if $hasnav == 1}
<div class="catnav">{$prev}{$navstr}{$next}</div>
{/if}
{section name=numloop loop=$items}
<div class="category_item"><a href="{$items[numloop].link}"><img src="{$items[numloop].image}" alt="{$items[numloop].title}"/></a><br />
<a href="{$items[numloop].link}">{$items[numloop].title}</a><br />
<span class="note">{$items[numloop].price}</span><br />
<form action="http://www.aitsafe.com/cf/add.cfm" method="post">
<input name="userid" value="xxxxxx" type="hidden">
<input name="product" value="{$items[numloop].title}" type="hidden">
<input name="price" value="{$items[numloop].price}" type="hidden">
<input name="return" value="{$items[numloop].link}" type="hidden">
<input class="submit" value="Buy Now" type="submit">
</form>
</div>
{/section}
</div>
<div class="clear"></div>
I've tweaked the appearance a bunch to get the style how I want it, but the important bit is just where Samuel changed the $price, etc to read {$items[numloop].link}.
Re: Integrating Mals-E Cart with Cataloger
Ooops. One little hitch. If you take that last bit of code as written, the shopping cart page will take you back to the *ITEM* page when you click "continue shopping," instead of taking you back to the catalog page where you were.
Best to stick in this line from the original code:
That's probably about all I'm likely to post here, unless I figure out something better. One thing I'd like to see is how to go ahead and implement that "cart status" thing from the Jesse Heap website. It involves setting cookies and some other bits of php. I worked on this for a little while, but since I'm on a deadline and this isn't really essential to my project, I didn't pursue it very far.
If anyone sees a need and completes these steps, I'd love to see your code. Thanks!
Best to stick in this line from the original code:
Code: Select all
<input type="hidden" value="http://{$smarty.server.SERVER_NAME}{$smarty.server.SCRIPT_NAME}?page={$smarty.get.page}" name="return" />
That's probably about all I'm likely to post here, unless I figure out something better. One thing I'd like to see is how to go ahead and implement that "cart status" thing from the Jesse Heap website. It involves setting cookies and some other bits of php. I worked on this for a little while, but since I'm on a deadline and this isn't really essential to my project, I didn't pursue it very far.
If anyone sees a need and completes these steps, I'd love to see your code. Thanks!