PrestaShop Forums: [CONTRIBUTION] Better order-steps template - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


[CONTRIBUTION] Better order-steps template


[CONTRIBUTION] Better order-steps template

#1 Eihwaz

    PrestaShop Apprentice

  • 01 Dec 2008
  • Members
  • PipPip
  • 144 posts
  • Location:Kiev — mother of russian cities

Posted 07 January 2010 - 05:31 PM

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 :)
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 -->



  • {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'}

    {l s='Summary'}

    {else}
    {l s='Summary'}
    {/if}





  • {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'}

    {l s='Login'}

    {else}
    {l s='Login'}
    {/if}





  • {if $current_step=='payment' || $current_step=='shipping'}

    {l s='Address'}

    {else}
    {l s='Address'}
    {/if}





  • {if $current_step=='payment'}

    {l s='Shipping'}

    {else}
    {l s='Shipping'}
    {/if}




  • {l s='Payment'}


<!-- /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-style: none;
width: 100%;
background-color: #fff;
height: 70px;
padding: 10px 0;
}
ul.step li{
position: relative;
height: 70px;
width: 20%;
list-style: none;
float: left;
background-image: url(../img/stepsSpr.gif);
background-repeat: repeat-x;
background-position: left -280px;
background-color: #0E96CC;
vertical-align: middle;
}
ul.step li ins {
display: block;
position: absolute;
top: 0px;
right: 0px;
width: 26px;
height: 70px;
background-image: url(../img/stepsSpr.gif);
background-repeat: no-repeat;
background-position: right top;
}
ul.step li.step_current ins{
background-color: #CD3C0F;
background-position: right -70px;
}
ul.step li.step_last_done ins{
background-color: #CCC30E;
background-position: right -140px;
}
ul.step li.step_done ins{
background-color: #CCC30E;
background-position: right -210px;
}
ul.step li.step_current{
background-position: left -350px;
background-color: #CD3C0F;
}
ul.step li.step_last_done, ul.step li.step_done{
background-position: left -420px;
background-color: #CCC30E;
}
ul.step li span a {
color: #fff;
}
ul.step li span{
position: absolute;
width:120px;
display:block;
left:5px;
top: 30px;
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.

Attached File(s)



#2 Guest__*

  • --
  • Guests

Posted 08 January 2010 - 02:28 PM

Thanks Eihwaz
That is really good. Have a good time

#3 Eihwaz

    PrestaShop Apprentice

  • 01 Dec 2008
  • Members
  • PipPip
  • 144 posts
  • Location:Kiev — mother of russian cities

Posted 08 January 2010 - 09:55 PM

Tesekkuerler :) (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.

#4 Bruno Lévêque

    PrestaShop Fanatic

  • 03 Aug 2007
  • PrestaTeam
  • 1083 posts
  • Location:Miami, FL

Posted 08 January 2010 - 10:07 PM

Great work!

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

Congrats!
Bruno LévêquePrestashop Co-founder (Co-fondateur)PrestaShop

#5 minirj01

    PrestaShop Addict

  • 03 May 2009
  • Members
  • PipPipPip
  • 578 posts
  • Location:Paris

Posted 09 January 2010 - 11:11 AM

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.
Version 1.2.5 Finale / Thème perso / OVH 90Plan / Presta-Fan

#6 Eihwaz

    PrestaShop Apprentice

  • 01 Dec 2008
  • Members
  • PipPip
  • 144 posts
  • Location:Kiev — mother of russian cities

Posted 09 January 2010 - 09:07 PM

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.

#7 mokijo

    PrestaShop Apprentice

  • 12 Jan 2010
  • Members
  • PipPip
  • 83 posts
  • Location:UK

Posted 23 January 2010 - 11:07 AM

Thanks Eihwaz. Nicely done, cheers for sharing!

#8 21846657

    PrestaShop Fanatic

  • 23 Aug 2009
  • Moderators
  • 1139 posts

Posted 26 January 2010 - 07:40 AM

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

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

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

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

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

#9 rubensicko

    PrestaShop Apprentice

  • 25 Aug 2009
  • Members
  • PipPip
  • 29 posts

Posted 08 February 2010 - 07:14 PM

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.

#10 Degsey

    PrestaShop Apprentice

  • 07 Aug 2009
  • Members
  • PipPip
  • 213 posts

Posted 09 February 2010 - 11:27 PM

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

#11 Rogerio Lima

    PrestaShop Apprentice

  • 27 Apr 2009
  • Members
  • PipPip
  • 40 posts

Posted 14 February 2010 - 07:32 PM

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

Attached File(s)



#12 Degsey

    PrestaShop Apprentice

  • 07 Aug 2009
  • Members
  • PipPip
  • 213 posts

Posted 14 February 2010 - 07: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 26x490. 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.

#13 Rogerio Lima

    PrestaShop Apprentice

  • 27 Apr 2009
  • Members
  • PipPip
  • 40 posts

Posted 15 February 2010 - 12:36 AM

From 1266172988:

It looks to me that you have downloaded the image as a thumbnail thats why it is not showing properly, it should be 26x490. 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.

#14 Hedrad

    PrestaShop Apprentice

  • 12 Aug 2009
  • Members
  • PipPip
  • 166 posts

Posted 20 April 2010 - 10:22 PM

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...

#15 snco

    PrestaShop Newbie

  • 12 Feb 2010
  • Members
  • Pip
  • 24 posts

Posted 29 April 2010 - 01:57 PM

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? (kotara4ko@gmail.com)

Thank you in advance
Alex

#16 snco

    PrestaShop Newbie

  • 12 Feb 2010
  • Members
  • Pip
  • 24 posts

Posted 29 April 2010 - 08:13 PM

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


Thank you for your contribution !

#17 blk1

    PrestaShop Apprentice

  • 25 Mar 2010
  • Members
  • PipPip
  • 44 posts

Posted 30 April 2010 - 10:15 AM

snco I see you have 'Purchase without an account' on your website - is this a module you downloaded?

#18 Eihwaz

    PrestaShop Apprentice

  • 01 Dec 2008
  • Members
  • PipPip
  • 144 posts
  • Location:Kiev — mother of russian cities

Posted 01 May 2010 - 12:56 PM

2 snco:
Hi! Sorry, I don't even have the psd file for it, I just did it as an example, saved directly to gif.
But I see you did a cool sprite yourself, very nice! :)

#19 snco

    PrestaShop Newbie

  • 12 Feb 2010
  • Members
  • Pip
  • 24 posts

Posted 01 May 2010 - 05:48 PM

Hi Eihwaz,

I am glad you like it. As I said in my previous post your contribution is also very nice and convenient.
Thanx again for that!

#20 snco

    PrestaShop Newbie

  • 12 Feb 2010
  • Members
  • Pip
  • 24 posts

Posted 01 May 2010 - 05:52 PM

Hello blk1,

Actually I found this one step checkout on the forum. It is a modification to existing prestashop ordering process, which allows the user to purchase without registration. I am attaching the files. In order to use it, you must replace the files from the archive with those on your store.

Good luck!

Attached File(s)







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users