X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Customizing & Smarty √ Having Some Problems (https://forum.x-cart.com/showthread.php?t=51342)

jdkerr 12-16-2009 05:22 AM

Customizing & Smarty √ Having Some Problems
 
I am taking my first real steps at some customization of 4.3 and running into some problems. My first task was to take on the Wholesale pricing summary presented to visitors. I found the code in product_prices.tpl. The area I am looking at is:

Code:

<table cellspacing="1" summary="{$lng.lbl_wholesale_prices}" >
  <tr class="head-row">
      <th>Quantity<br />(Packages or Items)</th>
      <th>Price</th>
    </tr>

  {foreach from=$product_wholesale item=w name=wi}
      <tr>
        <td>
          xxyyzz
          {strip}
          {$w.quantity}{if $w.next_quantity eq 0}+{elseif $w.next_quantity ne $w.quantity}-{$w.next_quantity}{/if}
          &nbsp;
          {if $w.quantity eq "1"}
            {$lng.lbl_item}
          {else}
            {$lng.lbl_items}
          {/if}
          {/strip}
        </td>
        <td>{include file="currency.tpl" value=$w.taxed_price tag_id="wp`$smarty.foreach.wi.index`"}</td>
      </tr>
    {/foreach}
  </table>


As can be seen, I inserted in the first TD box "xxyyzz" which in theory should display prior to the text in the table element.

When I view this in the browser (both IE8 and Firefox 3.5.5), I see this:
http://www.pcboard.ca/xcartimage.jpg

The "xxyyxx" specified does not seem to show up. Yet, if I view the source code generated by the page in the browser, it appears as below:


Code:

  <table cellspacing="1" summary="Wholesale prices" >
    <tr class="head-row">
      <th>Quantity<br />(Packages or Items)</th>
      <th>Price</th>
    </tr>
          <tr>
        <td>
          xxyyzz
          3-4&nbsp;Items
        </td>
        <td><span class="currency">$<span id="wp0">4.00</span></span></td>
      </tr>
          <tr>
        <td>
          xxyyzz
          5-9&nbsp;Items
        </td>
        <td><span class="currency">$<span id="wp1">3.50</span></span></td>
      </tr>
          <tr>
        <td>
          xxyyzz
          10+&nbsp;Items
        </td>
        <td><span class="currency">$<span id="wp2">3.00</span></span></td>
      </tr>
      </table>



Clearly, it is there in the source file, but will not display in any of my browsers.


Need some guidance here - as this one really has me confused ](*,)

Thoughts????
John

cflsystems 12-16-2009 05:29 AM

Re: Customizing & Smarty √ Having Some Problems
 
Try with putting the "xxyyzz" inside the {strip}. also see if the styling applied to this table limits the height of the cells

jdkerr 12-16-2009 05:32 PM

Re: Customizing & Smarty √ Having Some Problems
 
OKay. So I learned a little more today. Turns out - that the table is being generated through an external .JS routine and not just the HTML I was seeing.

After getting my head around that - I was able to make the changes I was aiming for! Lesson Learned!

Thanks...John

FTF 01-14-2011 04:14 PM

Re: Customizing & Smarty √ Having Some Problems
 
@jdkerr,

which js is generating the table?

FTF 01-14-2011 04:20 PM

Re: Customizing & Smarty √ Having Some Problems
 
Never mind. Found it.
I am using 4.4.1 Pro.

skins/common_files/modules/Product_Options/func.js line 370


All times are GMT -8. The time now is 02:53 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.