Jump to content

Product representation


Sonu2007

Recommended Posts

I am trying to retrieve plans from whmcs to plain php/html page. following code is working perfect

{if $plans.Processor}
 <tr class="gray">
           <td class="redid"> <b>Server Id</b> </td>
           <td class="redp"> <b>Processor</b></td>

           <td class="redr"><b>RAM</b></td>
           <td class="redh"><b>Hard Drive</b></td>
           <td class="redt"><b>Traffic</b></td>
		<td class="redm"><b>Monthly</b></td>
		<td class="redo"><b>Order</b></td>
            </tr>
{foreach from=$plans.Processor item=plan}
         <tr class="gray">
           <td>{$plan.serverid}</td>
           <td>{$plan.model}</td>
           <td>{$plan.ram} GB</td>
           <td>{$plan.hdd} GB</td>
           <td>{$plan.bandwidth} GB</td>
    <td>€ {$plan.monthly}</td>
    <td><a href="/cart.php?a=add&pid={$plan.pid}"><b>Order Now</b></a></td>
           </tr>

{/foreach}
{/if}

but it is giving me all plans in table list as i used <tr><td> for it

now i got following html code

<div class="list" style="height:212px;">
         <div>
           <h3>plan1</h3><a href="#" class="btn"><span>Order Now</span></a>
         </div>

         <ul class="plans" style="background: transparent url('/i/bg_services_bottom_3.png') no-repeat left bottom;">
           <li>Intel Atom 330 </li>
           <li>2 GB RAM</li>
           <li>1x 250 GB Hard Disk</li>
           <li>5000 GB Bandwidth on 100mbit</li>
           <li class="last3"><strong>SETUP FEE €0</strong></li>

           <li class="last"><span class="price"><strong>€59.00</strong> /month</span></li>
         </ul>
       </div>

       <div class="list" style="margin-left:11px;height:212px;">
         <div>
           <h3>plan2</h3><a href="#" class="btn"><span>order now</span></a>
         </div>

         <ul class="plans" style="background: transparent url('/i/bg_services_bottom_3.png') no-repeat left bottom;">
           <li>Intel Xeon L3426</li>
           <li>4 GB RAM</li>
           <li>1x 1000 GB Hard Disk</li>
           <li>5000 GB Bandwidth on 100mbit</li>
           <li class="last3"><strong>SETUP FEE €0</strong></li>

           <li class="last"><span class="price"><strong>€89.00</strong> /month</span></li>
         </ul>

 

how i impliment 1st method in above html code? whenever i tried, because of <for> and <if> loop only one product showing per line and i am trying to do 2 product per line from above code.

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