| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Editing /skin1/customer/main/cart.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() X-Cart Gold 4.0.18
I am trying to tighten up the display of the shopping cart, and I am focusing on editing /skin1/customer/main/cart.tpl /skin1/modules/Product_Options/display_options.tpl My goal is to make the cart look like this: [image removed] I have already edited the language file ("Selected options" was changed to "Color/Shade"; I have already edited /skin1/customer/main/cart.tpl to remove some 's that in my opinion were not required. I need to figure out 2 things: 1. Move the "Color: the_selected_color" to the same line as "Color/Shade:" 2. Delete (or disable print output) of the var, {$v.class}: I deleted {$v.class}: and now the output is how I want it, HOWEVER, I would like it formatted on the same line. My questions: 1. Did I do a Bad Thing by removing the {$v.class} variable from /skin1/modules/Product_Options/display_options.tpl ? Will this bite me later on? 2. WHERE in /skin1/customer/main/cart.tpl is the line break to put {$v.option_name} on its own line? Code:
I don't see a line break in there! What am I missing? I am a neewbie when it comes to Smarty/PHP (but not to html or css) - so any wisdom from the community is MUCH appreciated. Thanks! Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#2
|
|||||||
|
|||||||
![]() Quote:
The title you changed is meant to introduce the list of options not a specific option. I guess if 100% of your products will always have Color/Shade as the only option its OK to change it here but you really should just delete the title if you don't want it to say "Selected options" and deal with the color/shade option separately - see below. Quote:
Taking {$v.class} out will bite you later if you ever have options other than Color/Shade. If 100% of your products always have only one option called color you will be OK but its just as easy to do it right. What you really should do is delete the title (Selected options) as I said above, leave {$v.class}:$nbsp in and change the name of your option from Color to Color/Shade. That way if you ever have options other than color they will display properly. This will change the product page option from Color to Color/Shade as well. But is't that what you want - have it say the same thing on the product page and in the cart?
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
#3
|
|||||||
|
|||||||
![]() Quote:
Bingo. Thanks for the suggestion. 1. I restored the language, "Selected options" back to "Selected options" 2. I restored the {$v.class} variable from /skin1/modules/Product_Options/display_options.tpl , per your suggestion (also made v.class [b]; Code:
4. in /skin1/customer/main.cart.tpl - I changed the following: Code:
to look like Code:
That seemed to do the trick... Is there a better way to do this? I DO NOT need to see the "Selected options" label -- the variant label (in bold) is all that I need to see... I think the code will give me this now. Thanks a zillion for pointing this newb in the right direction. I WILL get it one of these days, and I am grateful to the community for being here. Someday I hope to give back as much as I get from reading everyone's posts. Thanks! Jeremy PS -- is there a way to COMMENT OUT these kinds of edits, as opposed to saving a backup, labeling the backup, etc... ? I tried using {* and *} but that didn't seem to work for this -- is this because we're deep into Smarty territory? I need to learn more about Smarty, I know... baby steps....
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#4
|
|||||||
|
|||||||
![]() Looks like you got it perfect Jeremy. Smarty comments work for me:
Code:
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
#5
|
|||||||
|
|||||||
![]() Quote:
Wow. Thanks. I didn't know you could comment out within a statement. (I'm a smarty newb -- i have lots to learn!) Ralph, thanks for your expertise and suggestions. Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|