a small paypal shop

5 posts by 2 authors in: Forums > CMS Builder
Last Post: March 27, 2008   (RSS)

By soj - March 26, 2008 - edited: March 27, 2008

Hi all,
I'm stuck and hoping for some help on two questions.
First, I'm using the Products menu to try and make a little paypal shop. I've got a some sample product content created. On my template, I've placed the php code into a table, image over text. This displays product records in one column. I'd like two or three columns. How might I accomplish this?

Next, what is the best to insert a paypal button in place of the order url?

Thanks in advance!

soj

Re: [soj] a small paypal shop

By Dave - March 26, 2008

The first step is to create a plain HTML mockup of what you want it to look like. This saves a lot of time compared to figuring out the exact design and CMS at the same time.

Next, when you'll look at your design there will be some kind of pattern in the HTML. You'll probably want to insert something every 3 records. Here's some code that keeps count and does that:

<?php $maxCols=3; if (@++$count % $maxCols == 0): ?> <br/>
... content to insert here ...
<?php endif ?>


Depending on how you design your page, you might insert the end and beginning of a table there (</tr></table><table ...><tr>), the end and beginning of a row (</tr><tr>) or something else.

If you get stuck post an url for your mockup HTML and your viewer and I can give you a hand.

Next, for the paypal button... What is the exact paypal button code? If you can post the button code I can tell you how to create it with CMS Builder.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] a small paypal shop

By soj - March 26, 2008 - edited: March 26, 2008

Thanks so very much, Dave. I tried a several combos with no success. I'm uncertain just where to place the extra code you suggested and whether or not I need to duplicate the viewer code.

Here is url of the page containing viewer code and table(s)you requested.

http://74.54.199.50/~stormrep/shop3.php

If it would make it easier, I don't mind having both image and record text in one cell.

Hopefully this will help more than just me and make it well worth the time!

My client has not yet set up his paypal account, so we can drop that question for now.

Soj

Re: [Dave] a small paypal shop

By soj - March 27, 2008

Oh! Thank you! That helped tons. I've got it work now, after only a couple of tries.
On to more happy coding.

soj