ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Newbie Problem - Twitter Bootstrap with Cartthrob

June 15, 2013 4:24pm

Subscribe [1]
  • #1 / Jun 15, 2013 4:24pm

    mashamit

    2 posts

    Good evening everyone.

    This is probably a really simple fix, Its just driving me crazy.

    Im building a store site with cartthrob and it have a fluid grid bootstrap layout.

    It has a 12 column grid

    span 3 for cart
    span 9 for products

    within the span 9 there is

    span3 for products per row.

    My problem is i cant figure out what to change to make it so I can have more per line on the nested span3. I can change the width of the products by choosing span2, but there are still only 3 items per row

    Ill try paste the page code here any help would be greatly appreciated

    {preload_replace:template_group="store"}
    {preload_replace:template="index"}
     
    {embed="{template_group}/_header" title="Shopping Cart" template_group="{template_group}" template="{template}" }
     
    </head>
    <body>
     {embed="{template_group}/_navbar" template_group="{template_group}" template="{template}"}
    
     {embed="{template_group}/_subhead" template_group="{template_group}" template="{template}"}
    
     {!-- since we're using twitter bootstrap, the main content area is designated "container", or some other specific classes depending on your requirements--}
     <div class="container">
      {!-- twitter bootstrap breaks up content into rows. The main section of this template is all one row. Rows can also be broken up into more rows --}
      <div class="row">
    
       {!-- twitter bootstrap breaks up (by default) pages into a 12 column grid. span3, span9 designate how much space these sections will take up --}
     <div class="span3">
        <div class="bs-docs-sidenav">
         {embed="{template_group}/_leftnav" template_group="{template_group}" template="{template}"}
        </div>
       </div>
    
       <div class="span9">
        <section id="main">
         {exp:channel:entries channel="store_kitchen_units_price_group_1" limit="30"  dynamic="no"}
          {if count==1}<h2>Available Products</h2><p><ul class="thumbnails">{/if}<br />
           {switch="<div class='row'>||"}<br />
           <li class="span2">      <br />
             {exp:cartthrob:add_to_cart_form<br />
    entry_id="{entry_id}"} <br />
          <div class="thumbnail"><br />
           {if unit_image}{unit_image}<br />
           {if:else}<br />
           <a href="http://placehold.it/300x200">http://placehold.it/300x200</a><br />
           {/if}<br />
           <div class="caption"><br />
            <span class="unit_title">{exp:cartthrob:item_options entry_id="{entry_id}" }<br />
    {select}<br />
    <option {selected} value="{option_value}">{option_name} {price}</option><br />
    {/select}<br />
    {/exp:cartthrob:item_options}</span><br />
          <br />
            <br />
             {if unit_price}<br />
              <span class="unit_price">Price: {unit_price:plus_tax} </span><br />
               <br />
             {/if}<br />
     <br />
    Quantity: <input  type="text" name="quantity" size=5" value="" /><br><br />
    <input type="submit" value="Add to Cart">{/exp:cartthrob:add_to_cart_form}<br />
            <br />
                   </div><br />
          </div><br />
          </li><br />
          {switch="||</div>"}<br />
          {if count==total_results}</ul><!-- end row -->{/if}<br />
         {/exp:channel:entries}<br />
         <br />
         <br />
         </section><br />
        </div><br />
                      <br />
      </div><br />
     </div></p>
    
    <p>  {embed="{template_group}/_footer" template="{template}" template_group="{template_group}"}

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases