| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Is this correct coding? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() I'm trying to get a feel for smarty coding. Please take a look at this and tell me if this is correct coding?
The original code is from the rectangle_top.tpl Quote:
It is to my understanding that this is the file where you can change the width of both your "customer" and "admin" x-cart. I want my cart/website to be optimized for the 1024 x 768 resolution. Thus I am trying to set my cart with to 970px. I personally use a 23" Widescreen and prefer to keep my admin area at 100% With ZERO knowledge of smarty I have figured out (by reading on these forums) how to do what I want. Here is my new code: Quote:
This coding does what I want it to do, it makes the customer area optimized for 1024x768 and leaves admin area alone. My question is: Did I do it the right way? or do I have too much info? or is there a better way it should read? Thanks
__________________
Doug Rock X-cart Gold 4.1.9 _____________________________________ Altered Cart: 1-Page checkout Firetank: Feed Manager Website CM: CDSEO PRO Website CM: Product A-Z Map Website CM: Review Approval Website CM: Site Map Pro Qualiteam: Sales & Stats (free version) |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() That looks ok .. i guess you can do the above with less amount of code:
Code:
Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() YEAH ! thats what I'm looking for. I didn't know if there was a less coding type way of doing it.
But will that way of writing it center the Admin area too? or just the customer? er... does everything you see before the {else} tag pertain to the {if $usertype eq"C"} tag and everything after the {else} tag remain default? Like I said, my first time playing with smarty coding so i'm not familiar with how it works. Wasn't sure if you can put it inside the <table> tags or not, I thought it had to be on the outside. Thanks
__________________
Doug Rock X-cart Gold 4.1.9 _____________________________________ Altered Cart: 1-Page checkout Firetank: Feed Manager Website CM: CDSEO PRO Website CM: Product A-Z Map Website CM: Review Approval Website CM: Site Map Pro Qualiteam: Sales & Stats (free version) |
|||||||||
#4
|
|||||||
|
|||||||
![]() Doug,
You are going to LOVE Samrty! One thing -- if you do an if/else for $usertype eq "C" -- thee are also possible usertypes that are not admin, such as "partner" if you use the x-affiliate module. So, sometimes if you want something FOR the admin only, it's best to code FOR $usertype eq "A" and not for the "C" -- Code:
Quote:
No - if you want to center the admin too, then move the closing {/if} BEFORE the align="center" You'll get it... just keep trying stuff and Smarty will make it clear what works and what doesn't. Have fun! Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Ahhh, good point Jeremy. Yeah I got my work cut out for me. I'm having a hell of a time trying to figure out customizing my header atm.
Thanks !!
__________________
Doug Rock X-cart Gold 4.1.9 _____________________________________ Altered Cart: 1-Page checkout Firetank: Feed Manager Website CM: CDSEO PRO Website CM: Product A-Z Map Website CM: Review Approval Website CM: Site Map Pro Qualiteam: Sales & Stats (free version) |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|