Jump to content

Template editing


kers7754

Recommended Posts

it depends on what cart template your using.

 

go to admin/setup/general settings/ordering in your admin area.

 

see which template your using then to edit you can find the tpl files in the templates/orderforms folder.

 

if i were you i would copy the folder and rename it to ssomething else then edit it and update which cart your using.

Link to comment
Share on other sites

Excellent!

 

I want my 3 hosting packages to be 3 boxes on the same line. So I edited the style.css #order-modern .products to have a width of 30% instead of 50%.

 

And I changed the products.tpl from:

{if $num % 2}<div class="clear"></div>

 

to:

{if $num % 3}<div class="clear"></div>

 

The style change worked, but I am still seeing 2 hosting packages on a line and the 3rd one underneath:

https://doory.com/account/cart.php

 

Is products.tpl not the correct template? Or is there something else wrong?

Link to comment
Share on other sites

Well. I dont think you understand how the modulus operator works (the percent sign).

 

What that operator does is return the remainder of the 2 numbers divided by each other.. So if num = 5, and you divide by 3, you get 2. if that if statement, the div would NOT show in this case.

 

Either way, working with a modulus you run into a couple issues. The main issue is the index numbers start at 0 for $num, so you'll need to step that up to 1 to start with. Something like this should make it work for you.

 

{assign var=n value=$num+1}
{if $n % 3 == 0}<div class="clear"></div>{/if}

 

Basically that will return for anything that doesnt return a remainder.. Meaning anything divisible by 3.

 

The only reason it was so simple to code with 2 is every other number is divisible by it.

 

Hope this helps!

Link to comment
Share on other sites

  • 4 months later...
  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated