| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Adding a blank line.. | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'm trying to figure out how to add a blank line if the item is not on sale. Specifically in the products view, if the item is on sale, the cart shows Market price and price, which is fine.. but I want it to add a blank line where Market Price would be if the item is not on sale, if that makes sense?
Basically, I am trying to get the buy now / add to wish list buttons to print on the same line so it is uniform. I tried this in the products_t.tpl Code:
But that did not change anything. Can anyone help me with this please?
__________________
4.1.11 New products News Management Magnifier BCSE Detailed Images Special Offers Wishlist OnSale |
|||||||
#2
|
|||||||||
|
|||||||||
![]() That's because you have the 2nd if statement - the one with the spaces, nested within the 1st if statement. That should come after the 1st statement.
Better would be to have an else in there instead. {if $discount gt 0} code {else} <br /><br /> {/if} That would solve your problem - although you might want to consider using an image spacer for the blank space, rather than line breaks, then you can control the actual space easier using css, and also, it will work better in different browsers.
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#3
|
|||||||
|
|||||||
![]() Thank you Paul. Perhaps I am looking in the wrong place. When I do this, it simply adds 2 blank lines in between the market price and price. I am trying to add blank lines only if the market price is not showing.
I hope that makes sense? Any suggestions of where would I need to add the blank lines in the products_t.tpl to make this happen?
__________________
4.1.11 New products News Management Magnifier BCSE Detailed Images Special Offers Wishlist OnSale |
|||||||
#4
|
|||||||||
|
|||||||||
![]() So you tried my suggestion, and it's adding the blank lines after the market price?
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#5
|
|||||||
|
|||||||
![]() yes.. instead of only adding it if the item is not on sale.
__________________
4.1.11 New products News Management Magnifier BCSE Detailed Images Special Offers Wishlist OnSale |
|||||||
#6
|
|||||||||
|
|||||||||
![]() OK, leave the original if statement as it was then:
{if $discount gt 0} <font class="MarketPrice">{$lng.lbl_market_price}: <s> {include file="currency.tpl" value=$products[product].list_price} </s></font><br /> {/if} Just before that if statement, there should be another if statement that starts: {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} We will use that for the {else} Add this then, immediately after your first, original if statement. {else} <br /><br /> So you should have something looking like this: {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount} {if $discount gt 0} <font class="MarketPrice">{$lng.lbl_market_price}: <s> {include file="currency.tpl" value=$products[product].list_price} </s></font><br /> {/if} {else} <br /><br /> {/if} Let me know if that makes sense.
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#7
|
|||||||
|
|||||||
![]() Thank you so much Paul!! I got it to work. I had to play with it a little.. but here is what it ended up being:
Code:
__________________
4.1.11 New products News Management Magnifier BCSE Detailed Images Special Offers Wishlist OnSale |
|||||||
#8
|
|||||||
|
|||||||
![]() Would you be able to help me with this also? Still trying to get everything aligned. At times the product title wraps to a 2nd line. I would like the thumbnail to align whether the product title is 1 line or 2 lines. I managed to accomplish this on the New Products view on the main page by editing the products_t.tpl from:
Code:
to this: Code:
However, it does not change the featured products nor the products under the categories or providers. I'm unsure why this is? I checked the featured.tpl and it is pulling from the products_t.tpl. Is there something else I need to edit to add the rowspan? Thank you for all of your help!!
__________________
4.1.11 New products News Management Magnifier BCSE Detailed Images Special Offers Wishlist OnSale |
|||||||
#9
|
|||||||||
|
|||||||||
![]() Can you post a link to your site?
Either here, or via PM, or email?
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#10
|
|||||||||
|
|||||||||
![]() Ok, I got your link - and I was looking at your New Products that you mentioned - did you mean the page you get to by clicking the 1st link in your categories - that takes you to: home.php?cat=2
Because for me on that page, they are still misaligned. Anyway, I think what you need to do, is add a fixed height to that product cell (<td>) - maybe something like height=30px
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|