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)
-   -   button graphics (https://forum.x-cart.com/showthread.php?t=12434)

Lara Croft 02-25-2005 05:01 PM

button graphics
 
it's me again :roll: - in the default shop template it has many buttons that are .tpl files.
how can i replace these graphics and any others for that matter with buttons that i have created myself using independant button making software.

Also - when i try to use the template editing feature - i cannot seem to get the debugging console to show to even find out what it actually will do for me.

i like the look of the standard shop template but would still like to be able to tweek it's layout and final look to my own tastes - can you please help me?

thanks and keep up the good work as newbies like me need you experienced people out there. :)

balinor 02-26-2005 04:29 AM

Ah, you have discovered one of the most annoying things about X-Cart....the buttons! Basically if you want to use your own buttons, there are a few ways of doing it.

1. You can edit the buttons/button.tpl, as this is the default template called by all of the buttons. It consists of a three cell table, with the rounded corners on either side, and the 'content' in the middle. The advantage of this is it will auto-stretch to whatever text you have in the button. You could replace the three cell layout with your single graphic, just be careful that all the text fits properly.

2. You could also just replace the whole line of code for each button in the templates with a simple html call to your button graphic. Something like:


You would, of course, replace the link with whatever the real link is, and you would have to upload the button graphic to skin1/images.

Hope this sheds some light on the subject!

Yang Xu 02-28-2005 08:47 AM

Quote:

Also - when i try to use the template editing feature - i cannot seem to get the debugging console to show to even find out what it actually will do for me.

It is a popup window. Make sure you don't have yahoo's popup blocker or Windows XP's popup blocker turned on.

Lara Croft 02-28-2005 09:01 AM

thankyou
 
thankyou - i will now go away and have a play - does that mean that i have to turn my button into 3 cells to keep the auto sizing facility ?
i first tried with a button and it didn't autosize before.

thanks again - i really appreciate the help.

balinor 02-28-2005 09:16 AM

Yes, cut off the ends of your button and add them to the first and last cell and it will auto-resize.

Lara Croft 03-01-2005 06:02 AM

buttons
 
thanks very very much

really appreciated :D

halestorm 03-04-2005 03:58 PM

Quote:

You would, of course, replace the link with whatever the real link is, and you would have to upload the button graphic to skin1/images.

This may sound dumb but how do you figure out what the real link is?

For example I want to replace the "Add to Cart Button"

I open the add_to_cart.tpl" file.

I replace:
Code:

{include file="buttons/button.tpl" button_title=$lng.lbl_add_to_cart href=$href title=$title style=$style}

With:

Where do I find the link for add to cart?

In the other button post somebody mentioned, "passed variables" What is that?

Thanks,

Daniel

balinor 03-04-2005 04:35 PM

Take a look at customer/main/product.tpl and see how the add to cart button is handled. Notice all of the 'hidden' variables that are called when the add to cart button is clicked.

halestorm 03-04-2005 04:47 PM

So would it be:


?

I'm not really a programmer so I'm not sure how to do this then. I may just use the buttons I already have then...

balinor 03-04-2005 04:47 PM

There you go :)


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

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