Jump to content

Text in the Permanent link bar


Chris_e

Recommended Posts

Hi Chris,

 

On the product detail page?

(Not really space to put text next to it, but below will work)

 

edit file themes/<your theme folder>/product.tpl   (Make backup!!)

 

Find 'add to cart' (Ctrl-F (Windows) /Command-F (mac) ) with this code around it: (Code sample PrestaShop 1.6.0.9) and add red + blue code

 

<button type="submit" name="Submit" class="exclusive">
<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>
</button><span class="simple_text">ADD HERE YOUR SOMPLE TEXT</span>
 
Result:
post-455771-0-37137400-1417693189_thumb.png
 
 
You can add some css code to make the text change colour, or different font etc :
edit themes/<your theme folder>/css/global.css:
 
and add to end something like :
 
.simple_text {
   // add any css code you like, for example:
   color = red;
}
 
hope that was what you wanted. If not, please elaborate.
 
pascal.
Link to comment
Share on other sites

Oh, sorry, re-reading your post I think I misunderstood what you wanted. You want to add some text at the top (of every page), next to your "shopping cart". My mistake...

 

Forget changes above.

 

- Do you want the text left or right of the shopping cart drop down button?

- What is the text (length) you want to add?

- PrestaShop version??

 

Sorry for confusion,

pascal

Edited by PascalVG (see edit history)
Link to comment
Share on other sites

OK, try this:

 

edit file /themes/theme701/header.tpl    (make backup!!!)

 

find the line :

<div id="header-inner">

 

just below this line, add:

  <div id="div_header_free_shipping">{l s='Free shipping'}</div>

 

and save the file.

 

Then, in /themes/theme701/css/global.css

 

add (to the end of the file):

 

div#div_header_free_shipping {

    float: right;

    margin-top: -177px;

    margin-right: 325px;

    color: lightgreen;  // change as desired. Also you can add font etc here.

}

 

@media (max-width: 767px) {
  div#div_header_free_shipping {

    margin-top: -114px;

    margin-right: 165px;

  }

}

 

(The second part is to change the position of the 'Free shipping' according to the theme change (i.e. the position of the shopping cart changes) when the browser width is smaller than 768 pixels wide)

 

That should do the trick.

pascal.

Link to comment
Share on other sites

Oops, sorry, small mistake.

 

I wrote div#div_header_free_shipping, should be just #div_header_free_shipping.

 

So

Add to global.css this instead

 

#div_header_free_shipping {

    float: right;

    margin-top: -177px;

    margin-right: 325px;

    color: lightgreen;  // change as desired. Also you can add font etc here.

}

 

@media (max-width: 767px) {
  #div_header_free_shipping {

    margin-top: -114px;

    margin-right: 165px;

  }

}

 
 
That should do it.
pascal
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...