Post by techiechic » Tue Sep 28, 2010 12:10 pm

I'm creating a custom template for a store here - http://dev.valerieatkisson.com/store/ and I'm having some trouble finding where the code that creates some of the elements that I want to style is. I think the page that best shows what I'm having trouble with is here - http://dev.valerieatkisson.com/store/in ... nt/history . I can't find where the code is that is creating the "continue" button there so that I can add the class "button" to it. Also, the text above it is being indented when it shouldn't be, but I can't find where that text is being generated so I can put a container around it to style it. Any help as to where this code is being generated so that I can fix it would be greatly appreciated!

User avatar
Newbie

Posts

Joined
Tue Sep 28, 2010 12:05 pm


Post by elmofried » Tue Sep 28, 2010 12:43 pm

I think the answer you are looking for is

\catalog\view\theme\default\template\account\create.tpl

i took a quick look at your new user form and you will only need to add your class to this line of code

<a class="sexybuttonclasshere" onclick="$('#create').submit();">Continue</a>

Hope it helps.

By the way your theme looks pretty awesome, well done. I would only change the buttons position on the cart, in terms of usability. Always remember that e-commerce users are used to see those 3 buttons displayed on this fashion:

<Go back to shopping> <Update whatever> <GiveCashNow (aka Checkout)>


Hugz,

Newbie

Posts

Joined
Tue Sep 21, 2010 8:22 pm

Post by techiechic » Tue Sep 28, 2010 12:51 pm

Thanks, but I just realized that I should have specified, I'm looking at the order history page... which of course will send you to the login page if you aren't logged in. Doh! So I've made a dummy customer, username: test@test.com and password - test . That should allow you to login and then view the history page. Sorry, that was totally my bad.

And thanks, I didn't actually design it, but I agree that my designer did an excellent job. I'll run your suggestions by him :)

User avatar
Newbie

Posts

Joined
Tue Sep 28, 2010 12:05 pm


Post by Xsecrets » Tue Sep 28, 2010 9:04 pm

I don't understand what's so hard to find. It would be catalog/view/theme/default/template/account/history.tpl or replace default with your theme name.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by techiechic » Wed Sep 29, 2010 1:57 am

That's what I would have thought too. However when there are no orders that have been made the code for the content of the page is apparently generated elsewhere, and I can't seem to find where that elsewhere is...

User avatar
Newbie

Posts

Joined
Tue Sep 28, 2010 12:05 pm


Post by techiechic » Wed Sep 29, 2010 2:11 am

Here's the exact code I'm looking at in that history.tpl file

Code: Select all

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center">
      <h1><?php echo $heading_title; ?></h1>
    </div>
  </div>
  <div class="middle">
    <?php foreach ($orders as $order) { ?>
    <div style="display: inline-block; margin-bottom: 10px; width: 100%;">
      <div style="width: 49%; float: left; margin-bottom: 2px;"><b><?php echo $text_order; ?></b> #<?php echo $order['order_id']; ?></div>
      <div style="width: 49%; float: right; margin-bottom: 2px; text-align: right;"><b><?php echo $text_status; ?></b> <?php echo $order['status']; ?></div>
      <div class="content" style="clear: both; padding: 5px;">
        <div style="padding: 5px;">
          <table width="100%">
            <tr>
              <td><?php echo $text_date_added; ?> <?php echo $order['date_added']; ?></td>
              <td><?php echo $text_customer; ?> <?php echo $order['name']; ?></td>
              <td rowspan="2" style="text-align: right;"><a onclick="location = '<?php echo str_replace('&', '&', $order['href']); ?>'" class="button"><span><?php echo $button_view; ?></span></a></td>
            </tr>
            <tr>
              <td><?php echo $text_products; ?> <?php echo $order['products']; ?></td>
              <td><?php echo $text_total; ?> <?php echo $order['total']; ?></td>
            </tr>
          </table>
        </div>
      </div>
    </div>
    <?php } ?>
    <div class="pagination"><?php echo $pagination; ?></div>
    <p><a onclick="location = '<?php echo str_replace('&', '&', $continue); ?>'" class="button"><?php echo $button_continue; ?></a></p>
  </div>
  <div class="bottom">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</div>
<?php echo $footer; ?>
I can see in there where the continue button is, and I've added the button class to that link and I can see how it generates the content for that page if there *are* orders. However, when a user pulls up the page and doesn't have any past orders it displays something completely different and the code for that content isn't contained in this .tpl file. Sorry I probably should have included this in the first place, I guess it didn't seem relevant initially since it's not where the code is that I'm looking for.

User avatar
Newbie

Posts

Joined
Tue Sep 28, 2010 12:05 pm


Post by Xsecrets » Wed Sep 29, 2010 2:57 am

oh you didn't specify that you were looking for the one when there were no orders. That's catalog/view/theme/default/template/error/not_found.tpl That template is used pretty much anywhere that you don't have something that the system is expecting to find.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by techiechic » Wed Sep 29, 2010 2:03 pm

Thanks! That was what I was looking for.

User avatar
Newbie

Posts

Joined
Tue Sep 28, 2010 12:05 pm


Post by techiechic » Wed Sep 29, 2010 2:08 pm

In a similar vein, any idea where the content generated from this line of code

Code: Select all

<div id="payment"><?php echo $payment; ?></div>
in /view/theme/theme_name/template/checkout/confirm.tpl is coming from? Again I'm just trying to style the buttons but I can't find them to add a style to them in the first place.

I'm also trying to find where the content generated from this line of code

Code: Select all

<?php echo $description; ?>
is coming from in /view/theme/theme_name/template/information/information.tpl . I wouldn't have thought it would be so difficult to find but I've looked everywhere that makes sense to me and I can't seem to find where these things are coming from.

Thanks again for the help so far, and in advance for help with this!

User avatar
Newbie

Posts

Joined
Tue Sep 28, 2010 12:05 pm


Post by Xsecrets » Wed Sep 29, 2010 8:45 pm

techiechic wrote:In a similar vein, any idea where the content generated from this line of code

Code: Select all

<div id="payment"><?php echo $payment; ?></div>
in /view/theme/theme_name/template/checkout/confirm.tpl is coming from? Again I'm just trying to style the buttons but I can't find them to add a style to them in the first place.
not sure what version you are working on, but in mine there is no $payment variable in that file at all.
I'm also trying to find where the content generated from this line of code

Code: Select all

<?php echo $description; ?>
is coming from in /view/theme/theme_name/template/information/information.tpl . I wouldn't have thought it would be so difficult to find but I've looked everywhere that makes sense to me and I can't seem to find where these things are coming from.

Thanks again for the help so far, and in advance for help with this!
this comes from the database and can be controlled via the admin information pages.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Wed Sep 29, 2010 9:34 pm

Xsecrets wrote:
techiechic wrote:In a similar vein, any idea where the content generated from this line of code

Code: Select all

<div id="payment"><?php echo $payment; ?></div>
in /view/theme/theme_name/template/checkout/confirm.tpl is coming from? Again I'm just trying to style the buttons but I can't find them to add a style to them in the first place.
not sure what version you are working on, but in mine there is no $payment variable in that file at all.
There is for me. That has never changed. That is how the $payment form gets loaded. The buttons come from the individual payment module tpl files, but they should all have the same class as the rest of the buttons in the cart

class="button">

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by techiechic » Fri Oct 01, 2010 2:32 pm

Thank you both! That helped me find exactly what I was looking for. Building this template has been a beast, but I think I'm starting to see the light at the end of the tunnel!

User avatar
Newbie

Posts

Joined
Tue Sep 28, 2010 12:05 pm

Who is online

Users browsing this forum: No registered users and 11 guests