Jump to content

Products listed side by side on cart.php


KuJoe

Recommended Posts

Ahaaaaa....

 

It does appear that you have both helped me :)

 

I used code that was sent to me in a pm from BAJI26.....

 

The below is for: http://forum.whmcs.com/attachment.php?attachmentid=205&stc=1&thumb=1&d=1210317850

 

I hope I have all the .css.

What's your site?

 

 

<table style="width: 100%; border: 1px solid #e0e0e0;" cellpadding="2" cellspacing="20" >
<tr>
{foreach key=num item=product from=$products}
<td valign="top"><div class="cartboxproducts">
<p class="productname"><strong>{$product.name}</strong> {if $product.qty!=""}<em>({$product.qty} {$LANG.orderavailable})</em>{/if}</p>
<div class="surround">
{if $product.description}{$product.description}<br />{/if}
<div style="margin:5px;padding:2px;color:#cc0000;">
{if $product.paytype eq "free"}
{$LANG.orderfree}
{elseif $product.paytype eq "onetime"}
{$product.pricing.onetime} {$LANG.orderpaymenttermonetime}
{elseif $product.paytype eq "recurring"}
{if $product.pricing.monthly}{$product.pricing.monthly}<br />{/if}
{if $product.pricing.quarterly}{$product.pricing.quarterly}<br />{/if}
{if $product.pricing.semiannually}{$product.pricing.semiannually}<br />{/if}
{if $product.pricing.annually}{$product.pricing.annually}<br />{/if}
{if $product.pricing.biennially}{$product.pricing.biennially}<br />{/if}
{/if}
</div>
</div><br>
<div align="center"><input type="button" value="{$LANG.ordernowbutton}"{if $product.qty eq "0"} disabled{/if} onclick="window.location='{$smarty.server.PHP_SELF}?a=add&pid={$product.pid}'" /></div>
</div>
</td>
{if $num is not div by 2}
</tr>
<tr>
{/if}<br />
{/foreach}
</tr>
</table>
<p align="center"><input type="button" value="{$LANG.viewcart}" onclick="window.location='cart.php?a=view'" /></p>

 

 


.cartboxproducts {
 width: 100%;
 height:250px;
 margin-left: auto;
 margin-right: auto;
 padding: 10px;
 background-color: #f7f7f7;
 border: 1px dotted #cccccc;
}

.productname {
 font-size:14px;
}

.surround {
 border: 1px solid #D8D8DA;
 padding: 5px;
}

 

Let me know if this works!

 

However, I have also got a thread bookmarked from you sparky http://forum.whmcs.com/showthread.php?t=15196&highlight=columns

 

which is where the other bits came from.

 

So, as said earlier Sparky & BAJI26, credit to you both :D

 

I hope that peeps aren't arguing, as I know I have never claimed to have done the code, nor tried to claim it for someone on their behalf. I merely wanted to post up the bits I had modded, as I thought that it made things a little easier for styling.

 

:D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated