Cart Manager – Add to Cart Button

March 9, 2012
Developers
LinkedInTwitterFacebookEmail

There’s nothing more frustrating to me than badly-written help articles… and Cart Manager has those in spades. I recently worked on a project where I had to configure the Add to Cart buttons in Joomla using PHP and the Cart Manager. This was my first time using Cart Manager, so I was shocked at the absence of helpful articles on the web.

Hence this article. I’m assuming you already have a Cart Manager account and the options included for the items. All I’ll really be showing you here is the all-important programming for the Add to Cart Button.

Basic Layout

The basic layout for an Add to Cart button goes like this:

cartid|itemname|itemcost|itemquantity
|itemno|itemhandling|itemshipmethod|itemweight|itemexempt|itemdiscount
|itemsilentpost|itemdropshipzip|itemESD|itemRecurring

Which you add to your form by this:

Note: My examples come from BarkBoutique.com, an adorable site for dog and cat collars.

First, notice that these codes actually get added to a hidden value of your form named “additem”. So start with this:

Now you want to add the items in the order above, each one separated by the “|” symbol. I won’t explain all of them below, but I’ll cover the most popular ones.

Remember as you go down the list that any of these items can be replaced with PHP coding from the database.

CartID – BarkB

This is your cart ID from Cart Manager.

ItemName – Color Dots Collar

Whatever your calling that item. Include this so it shows up in the shopping cart.

ItemCost – 25.00

Leave out the dollar sign, but this is what it costs

ItemQuantity – VAR11113Quantity_rawtext

I added an option for them to type in the quantity of the item they wanted to add to the cart. To connect a text field to this quantity, create a field with name = “VAR”. The next five numbers listed was the product ID, which I pulled from a database, and then Cart Manager’s coding: “Quantity_rawtext” that needs to be included.

ItemNumber – 11113

Product’s ID Number, from my database, but could be handcoded.

ItemHandling – 0

My client didn’t want to add handling, so I left it at 0. You can add a certain amount here for handling across the board.

ItemShipMethod – Price

So here’s the tricky one. When you go to Cart Manager’s admin area, and go to the Shipping Options on the left, be aware that the set-up is weird. First, go down to Shipping By Table and add your shipping options (I put under 24.99, shipping is $2.50, etc.). Now add “Price” to this field in your form (or “weight” or “quantity” depending on which table you chose to base your shipping off of).

Now go back up to Basic Domestic Charges at the top of Cart Manager’s Shipping page. These charges will super-cede your table prices. Just match them up (as best you can, the cart will ask the shipping table for more specifics) to what’s in your table (leave Free Shipping Threshold blank. Anything OVER that number will be free shipping). And don’t forget to save the page.

ItemWeight – 0

I left all the item’s weight at 0 because the shipping prices weren’t based on that. Of course if you created a Weight Table for your shipping charges (above) you’ll need to fill this out as well.

Form Action

Now that you’ve created the form, the form action should be set at: https://www.cartmanager.net/cgi-bin/cart.cgi

Those are all the items needed to get your cart up and running. If you’ve had experience in Cart Manager with the other items, please leave a comment! 

 

Join the Discussion

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>