Jump to content

box.basket.php


vit320

Recommended Posts

just modifyed this script to fit into my table..but when i click add product, tha table that is around basket script become a recursive table like attached image. I see the part of script...

 

{foreach from=$CONTENTS item=item}
    <li>
      <span class="price">{$item.total}</span>
      <a href="{$item.link}" title="{$item.name}">{$item.quantity} &times; {$item.name_abbrev}</a>
    </li>
    {/foreach}

 

but i ask this content is inside a <td> why it do this effect?

look photo and try on www.pcutile.it to add some product to see recursive table...:-(

i want obtain only a table that contain box.basket.php

 

N.B: after adding several product and see recursive table..(it's a sample name ok?) if press F5 it update correctly why?

Link to comment
Share on other sites

I looked at the Source Code when I had several boxes, but I don't know if this means anything or not. The first <td> row in this section was in red in FireFox.

<tr>
<td rowspan="1" colspan="2" width="14" height="96" style="background-image:url(http://www.pcutile.it/images/08SHOP_02_5x4_2x1.jpg)"</td>
<td rowspan="1" colspan="1" width="152" height="96" style="background-color:#00b9e8;">
	<div id="basket_summary">
  <h3>Il tuo carrello.</h3>
    <p style="text-align: center;">Il Carrello è vuoto.</p>
  </div>
</td>
<td rowspan="1" colspan="1" width="15" height="96"  style="background-image:url(http://www.pcutile.it/images/08SHOP_02_5x4_2x3.jpg)"></td>
</tr>

PS: To set code sections off so they are easier to read - use the <> on the Editor ribbon at the top of each post. To set off quotes, there is a comment bubble.

Link to comment
Share on other sites

Item: Mailing List table, row 2, column 2, unclosed <td> tag.

 

Item: Shopping Basket table, row 2, column 1, unclosed <td> tag.

 

The reason for this effect is because CubeCart returns the entirety of the box.basket.php template -- but, the javascript ajax call will place that content in the <div id="basket_summary"> -- which is only part of the box.basket.php template.

 

In the file, box.basket.php, find:

<table width="181" cellspacing="0" cellpadding="0" border="0">

 

Make it:

<table id="basket_summary" width="181" cellspacing="0" cellpadding="0" border="0">

 

Find:

<div id="basket_summary">

 

Make it:

<div>

 

Edit: That may not work. Let me check the javascript.

Link to comment
Share on other sites

For me, with the javascript at 'div#basket_summary', the ajax returned content -- a complete table -- was put inside the <div id="basket_summary">, which is nested inside the table.

 

So, I got what your posted image looked like. A complete table nested inside a table. A second "add to Basket" and I got another complete table, nested inside the table that is already nested inside a table.

 

Now, after the first edits to box.basket.php, there is 'table#basket_summary'. The javascript, when it does not find 'div#basket_summary', abandons the ajax request and has the browser make a regular POST page request. You might notice that the basket "Vedi Carrello" does not shake anymore?

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.

×
×
  • Create New...