Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Customizing & Smarty √ Having Some Problems

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-16-2009, 05:22 AM
 
jdkerr jdkerr is offline
 

Advanced Member
  
Join Date: Sep 2009
Posts: 32
 

Default 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
__________________
X-cart Gold v4.3.0
Fashion Mosaic
X-Magnifier
Reply With Quote
  #2  
Old 12-16-2009, 05:29 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 12-16-2009, 05:32 PM
 
jdkerr jdkerr is offline
 

Advanced Member
  
Join Date: Sep 2009
Posts: 32
 

Default 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
__________________
X-cart Gold v4.3.0
Fashion Mosaic
X-Magnifier
Reply With Quote
  #4  
Old 01-14-2011, 04:14 PM
 
FTF FTF is offline
 

Newbie
  
Join Date: Dec 2010
Posts: 2
 

Default Re: Customizing & Smarty √ Having Some Problems

@jdkerr,

which js is generating the table?
__________________
X-cart Pros v4.4.1
Reply With Quote
  #5  
Old 01-14-2011, 04:20 PM
 
FTF FTF is offline
 

Newbie
  
Join Date: Dec 2010
Posts: 2
 

Default 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
__________________
X-cart Pros v4.4.1
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:38 PM.

   

 
X-Cart forums © 2001-2020