Hello, Guest |
| Register
Remember me Forgot password ?
Site Map Site Map Contact us Contact us
PrestaShop e-commerce software
  815 users online
Forum  >  English Forum  >  Integration  >  Thread

1 of 2
1
Post Reply
New Topic
[CONTRIBUTION] Better order-steps template

offline
Posted: 07 January 2010 07:31 PM   [ Ignore ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 149
  • last 7 days: 0
Joined: 2008-12-01

See the image attached to see the difference between original and modified versions.
The markup and css used are based on Cody Lindley’s “CSS Step Menu” article, but I did my share of tweakings too smile
So, yeah, the advantages are:
Cross-browser compatible (I’m kind of guessing here, so don’t take my word for it)
Uses sprites (one sprite, in fact, so your customer’s browser will send one request versus 5.
Degrades nicely if images are disabled.

Here’s what you should do to make it work:
Find your order-steps.tpl file in your shop’s theme folder and completely replace it’s markup with this:
order-steps.tpl:

{Assign a value to 'current_step' to display current style *}
<!-- Steps -->
<
ul class="step" id="order_step">
    <
li class="{if $current_step=='summary'}step_current{else}{if $current_step=='login'}step_last_done{elseif $current_step=='payment' || $current_step=='shipping' || $current_step=='address'}step_done{else}step_todo{/if}{/if}">
        <
span>
            
{if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'}
            
<a href="{$base_dir_ssl}order.php">
                
{l s='Summary'}
            
</a>
            
{else}
                {l s
='Summary'}
            {
/if}
        
</span>
        <
ins></ins>
    </
li>
    <
li class="{if $current_step=='login'}step_current{else}{if $current_step=='address'}step_last_done{elseif $current_step=='payment' || $current_step=='shipping'}step_done{else}step_todo{/if}{/if}">
        <
span>
            
{if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'}
            
<a href="{$base_dir_ssl}order.php?step=1">
                
{l s='Login'}
            
</a>
            
{else}
                {l s
='Login'}
            {
/if}
        
</span>
        <
ins></ins>
    </
li>
    <
li class="{if $current_step=='address'}step_current{else}{if $current_step=='shipping'}step_last_done{elseif $current_step=='payment'}step_done{else}step_todo{/if}{/if}">
        <
span>
            
{if $current_step=='payment' || $current_step=='shipping'}
            
<a href="{$base_dir_ssl}order.php?step=1">
                
{l s='Address'}
            
</a>
            
{else}
                {l s
='Address'}
            {
/if}
        
</span>
        <
ins></ins>
    </
li>
    <
li class="{if $current_step=='shipping'}step_current{else}{if $current_step=='payment'}step_last_done{else}step_todo{/if}{/if}">
        <
span>
            
{if $current_step=='payment'}
            
<a href="{$base_dir_ssl}order.php?step=2">
                
{l s='Shipping'}
            
</a>
            
{else}
                {l s
='Shipping'}
            {
/if}
        
</span>
        <
ins></ins>
    </
li>
    <
li class="{if $current_step=='payment'}step_current{else}step_todo{/if}">
        <
span>{l s='Payment'}</span>
    </
li>
  </
ul>
<!-- /
Steps -->

Open your global.css file, find
/* steps (like order step) */

AND
/* Special style for block cart */

Replace css code between those two lines with the following:
/* steps (like order step) */
ul.step {
    
list-stylenone
    
width100%; 
    
background-color#fff; 
    
height70px
    
padding10px 0;
}
ul
.step li{
    position
relative;
    
height70px;
    
width20%;
    list-
stylenone;
    
floatleft;
    
background-imageurl(../img/stepsSpr.gif);
    
background-repeatrepeat-x;
    
background-positionleft -280px;
    
background-color#0E96CC;
    
vertical-alignmiddle;
}
ul
.step li ins {
    display
block;
    
positionabsolute;
    
top0px;
    
right0px;
    
width26px;
    
height70px;
    
background-imageurl(../img/stepsSpr.gif);
    
background-repeatno-repeat;
    
background-positionright top;
}
ul
.step li.step_current ins{
    background
-color#CD3C0F;
    
background-positionright -70px;
}
ul
.step li.step_last_done ins{
    background
-color#CCC30E;
    
background-positionright -140px;
}
ul
.step li.step_done ins{
    background
-color#CCC30E;
    
background-positionright -210px;
}
ul
.step li.step_current{
    background
-positionleft -350px;
    
background-color#CD3C0F;
}
ul
.step li.step_last_doneul.step li.step_done{
    background
-positionleft -420px;
    
background-color#CCC30E;
}
ul
.step li span a {
    color
#fff;
}
ul
.step li span{
    position
absolute;
    
width:120px;
    
display:block;
    
left:5px;
    
top30px;
    
font-weight:bold;
    
color#fff;
}
/* Special style for block cart */

Finally, put the stepsSpr.gif that I’ve attached to this post in your theme’s directory img folder.

Image Attachments
ovsm.gifstepsSpr.gif
 
offline
Posted: 08 January 2010 04:28 PM   [ Ignore ]   [ # 1 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 147
  • last 7 days: 0
Joined: 2009-08-19

Thanks Eihwaz
That is really good. Have a good time

 
offline
Posted: 08 January 2010 11:55 PM   [ Ignore ]   [ # 2 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 149
  • last 7 days: 0
Joined: 2008-12-01

Tesekkuerler smile (I know two words in turkish: “merhaba” and “tesekkuerler”)
Does it work fine?
Because everyone seems to be a bit quiet, so I’m not really sure if people can get it to work using my instructions.

 
prestateam offline
Posted: 09 January 2010 12:07 AM   [ Ignore ]   [ # 3 ]
PrestaTeam

Avatar


Great work!

Moreover the code seems to be well-designed with CSS spriting wink

Congrats!

 Signature 

Bruno LévêquePrestashop Co-founder (Co-fondateur)PrestaShop
Help PrestaShop, make a donation !

 
offline
Posted: 09 January 2010 01:11 PM   [ Ignore ]   [ # 4 ]
V.I.P.
RankRankRankRank
Avatar

Messages :

  • total: 588
  • last 7 days: 0
Joined: 2009-05-03

Hi Eihwaz,
…well done, your tip works fine and cute !!
(But your instructions concerning global.css are not so clear ; )
Thanks for your good idea.

 Signature 

Version 1.2.5 Finale / Thème perso / OVH 90Plan / Presta-Fan

 
offline
Posted: 09 January 2010 11:07 PM   [ Ignore ]   [ # 5 ]
Club Member
RankRankRank
Avatar

Messages :

  • total: 149
  • last 7 days: 0
Joined: 2008-12-01

Thank you all for responces, I’ll try to keep theese little things coming.
I’ve also updated the instructions, so there should be no problems making it work anymore. I’ll also post PSD file for the sprite, as soon as I find reliable and free file-hosting.

 
offline
Posted: 23 January 2010 01:07 PM   [ Ignore ]   [ # 6 ]
Regular
RankRank

Messages :

  • total: 85
  • last 7 days: 0
Joined: 2010-01-13

Thanks Eihwaz. Nicely done, cheers for sharing!

 
offline
Posted: 26 January 2010 09:40 AM   [ Ignore ]   [ # 7 ]
Partner
RankRankRankRankRank
Avatar

Messages :

  • total: 1001
  • last 7 days: 27
Joined: 2009-08-23

Wow, very nice breadcrumb-like steps with css sprite. Cheers!

 Signature 


* 欢迎访问PrestaShop官方中文论坛

* 搜索是你的朋友。提问之前请善用搜索引擎。

* 未获得帮助?——请详述问题,提供PrestaShop版本、运行环境(Web Server/PHP/MySQL)、浏览器类型等必要信息。

* 如果问题解决了,请为你的帖子标题加上[已解决]。谢谢。

* 本人仅于本论坛学习和讨论,暂不提供IM/PM/Email咨询服务。

 
offline
Posted: 08 February 2010 09:14 PM   [ Ignore ]   [ # 8 ]
Apprentice
RankRank

Messages :

  • total: 35
  • last 7 days: 0
Joined: 2009-08-26

Hi all! In the last step (payment) I have 2 colors, red and blue (the last step should be all red i think). Help!

Thank you.

 
offline
Posted: 10 February 2010 01:27 AM   [ Ignore ]   [ # 9 ]
Club Member
RankRankRank

Messages :

  • total: 217
  • last 7 days: 0
Joined: 2009-08-07

In the last step for payment it should be all yellow and a red segment at the end.

 Signature 

For all your computer needs visit Mr PC Direct

signature.php

 
offline
Posted: 14 February 2010 09:32 PM   [ Ignore ]   [ # 10 ]
Apprentice
RankRank

Messages :

  • total: 31
  • last 7 days: 0
Joined: 2009-04-27

In my store, the image is like that i have attached, is not look good, can you help me?

Image Attachments
Sem título.jpg
 
offline
Posted: 14 February 2010 09:43 PM   [ Ignore ]   [ # 11 ]
Club Member
RankRankRank

Messages :

  • total: 217
  • last 7 days: 0
Joined: 2009-08-07

It looks to me that you have downloaded the image as a thumbnail thats why it is not showing properly, it should be 26×490. It appears that you may have downloaded the image shown in the thread and not clicked on it to a new window and right click and copy it.

 Signature 

For all your computer needs visit Mr PC Direct

signature.php

 
offline
Posted: 15 February 2010 02:36 AM   [ Ignore ]   [ # 12 ]
Apprentice
RankRank

Messages :

  • total: 31
  • last 7 days: 0
Joined: 2009-04-27
Degsey - 14 February 2010 09:43 PM
It looks to me that you have downloaded the image as a thumbnail thats why it is not showing properly, it should be 26×490. It appears that you may have downloaded the image shown in the thread and not clicked on it to a new window and right click and copy it.

Yes that’s right, now everything is ok. Tank You,
Best regards.

 
offline
Posted: 21 April 2010 01:22 AM   [ Ignore ]   [ # 13 ]
Regular
RankRank

Messages :

  • total: 76
  • last 7 days: 0
Joined: 2009-08-13

Thanks for this contribution.
In french : “login” is traduct by “identifiez-vous”. The weight is too long ; so, in “ul.step li span”, I do this : “font-size: 9px;”

Sorry for my poor english…

 
offline
Posted: 29 April 2010 04:57 PM   [ Ignore ]   [ # 14 ]
Beginner
Rank

Messages :

  • total: 20
  • last 7 days: 0
Joined: 2010-02-12

Hello Eihwaz,

I like your solution and want to use it in my shop. But I want to make some changes on the image file. Is it possible to send me the .PSD file by email? ()

Thank you in advance
Alex

 
offline
Posted: 29 April 2010 11:13 PM   [ Ignore ]   [ # 15 ]
Beginner
Rank

Messages :

  • total: 20
  • last 7 days: 0
Joined: 2010-02-12

I dealed with it…
http://stepcare.eu/shop/my-account.php

Thank you for your contribution !

 
 
1 of 2
1
Fast Reply
New Topic