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: [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: [soj] a small paypal shop

By Dave - March 27, 2008

No problem. Try something like this:

<table border="1"><tr>

<?php foreach ($listRows as $record): ?>
<td>
num: <?php echo $record['num'] ?><br/>
Name: <?php echo $record['name'] ?><br/>
... etc ...
</td>

<?php $maxCols=3; if (@++$count % $maxCols == 0): ?> <br/>
</tr><tr>
<?php endif ?>

<?php endforeach ?>

</tr></table>


Try experimenting with that for a while and let me know if it makes sense or not.

Basically, we're creating a table ("<table><tr>") and printing each record in a <td>...record...</td> and then we're ending and starting a row every 3 records "</tr><tr>".

Let me know if you have any luck with that.
Dave Edis - Senior Developer
interactivetools.com

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