| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
css positioning | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() in my products.tpl file, I want to add an icon for reduced products,
at the moment I have: Code:
where the current save money section is below the description, then in my css I set the size, image etc.. I really want this to be at the top of the product details section, but at that point in the tpl $discount is not set, so I can't just move the if statement further up. My descriptions vary in size, so I can't just change the top: 10px; setting for the savemoneylabel as the value it needs to be is different each time. Can anyone help me either change the if statment so I can move it further up, or change the css to have it positioned at the top of the PList section? TIA
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#2
|
|||||||
|
|||||||
![]() Amy, take a look at NEGATIVE positioning with css margin
something like: Code:
Negative positioning can really be a mind-f*%k, so be careful out there! Google "negative margin css" and see what you find... http://www.communitymx.com/content/article.cfm?cid=b0029 Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#3
|
|||||||||
|
|||||||||
![]() I've got that, the problem is that at the moment the div is below the product description, which varies in size.
I want the div to appear at the top of the product description. I can't just move the div in the tpl as the variable it is testing ($discount) is not set higher up the tpl. to move it with the negative value, the value would have to vary as the product description length varies, to put it above the description. still looking for a solution, Thanks
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#4
|
|||||||
|
|||||||
![]() Amy,
Try: explore the "capture" smarty command ???
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() not sure how this would work?
It seems like it allows you to 'move' template features down, I need to move the smarty stuff up, so the discount is caculated earlier, then I can just move the div up, or I need to move the div up so it's in the place I 'd like. I'm not sure why $discount isn't calculated in the php and passed to the template, rather than being calculated in the template. I would have though the discount calulation was a php function instead of a display function,
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|