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)
-   -   Welcome Category Image (https://forum.x-cart.com/showthread.php?t=17738)

khotos 11-03-2005 04:00 PM

Welcome Category Image
 
Hi,

I want to add an image in each category main page.
I tried placing html code into the category description but I had a large blank space between the header and my table with the images.

How can I fix this separation? or if there any better way to do this.

Thanks

Mike

balinor 11-03-2005 04:18 PM

X-Cart replaces returns with
tags by default in the category description. In order to get html to work properly, open up subcategories.tpl and replace this:

Code:

{$current_category.description|regex_replace:"/[\n]/":"
"}


with this:

Code:

{$current_category.description}

That should do the trick :)

khotos 11-03-2005 04:33 PM

Quote:

Originally Posted by balinor
X-Cart replaces returns with
tags by default in the category description. In order to get html to work properly, open up subcategories.tpl and replace this:

Code:

{$current_category.description|regex_replace:"/[\n]/":"
"}


with this:

Code:

{$current_category.description}

That should do the trick :)



Works great, thank you very much for your help.
http://paint-store.net/store/home.php?cat=1

Do you know how to delete the navigation text above the table?
Please see the link.

Thanks

balinor 11-03-2005 04:35 PM

That is in home.tpl, it is location.tpl. Just remove the include or comment it out.

khotos 11-03-2005 04:43 PM

Quote:

Originally Posted by balinor
That is in home.tpl, it is location.tpl. Just remove the include or comment it out.


WOW your are the man. ;-)

The last one.
How can I delete the welcome text on home xcart ?

Thanks
Mike

balinor 11-03-2005 04:47 PM

Ok, but I start charging after this one :)

Easiest way is to just open up Languages in your admin menu and search for txt_welcome and put in your own content or clear it completely. You can also have a look at what is in the welcome template at customer/main/welcome.tpl.[/code]

eaglemobiles 11-07-2005 12:55 PM

HI
 
I have tried the codes but it didnt work, could you please help me as i wan the same to put html and jave scripts in categories and sbucategories text box.

Thanks

balinor 11-07-2005 01:04 PM

If you are using javascript, you need to surround it with {literal} tags:

{literal}code{/literal}

eaglemobiles 11-07-2005 01:09 PM

Hi,
 
Thanks for reply Balinor, below is my code when I put this code and clcik on save I get a blank box nothing saving in category text area.

{literal}
<script Langauge="JavaScript1.2">
<!--//

function openService(){
var screenWidth = 0;
var screenHeight= 0;
if (document.all || document.layers) {
screenWidth = screen.Width;
screenHeight = screen.Height;
}
var popupWinWidth = 600;
var popupWinHeight = 600;
var popupTopPosition = (screenHeight-popupWinHeight)/2;
var popupLeftPosition = (screenWidth-popupWinWidth)/2;
window.open('http://www.three.co.uk/microsites/Asset/3/redirectService.htm','popup','width=' + popupWinWidth + ',height='+ popupWinHeight +',top=' + popupTopPosition + ',left=' + popupLeftPosition + 'toolbar=no,location=no,status=no,menubar=no,scrol lbars=yes,resizable=no');
}

//-->
</script>

http://www.three.co.uk/microsites/Asset/3/servicebutton.gif
{/literal}

balinor 11-07-2005 02:24 PM

Literal tags only around the javascript....


All times are GMT -8. The time now is 05:20 AM.

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