Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2008
    Posts
    39
    Plugin Contributions
    0

    Default Aligning Shoping Cart Values

    Hi

    On the shopping cart page (step 2 of 3) I have the prices (sub-total, standard rate, discount etc) like the following:

    Sub-Total: £xx.xx
    Standard Rate: £xx.xx
    10% Discount: £-xx.xx
    Total: £xx.xx

    As you can see, when there is a discount, it adds a minus (-) and therefore this extra character pushes the text 1 character to the right.

    What I'm looking to do, is to align all of these up.

    I have the following code:
    PHP Code:
    <?php
    /**
     * Displays order-totals modules' output
     */
      
    for ($i=0$i<$size$i++) { ?>
    <div id="<?php echo str_replace('_'''$GLOBALS[$class]->code); ?>">
        <div class="totalBox larger forward"><?php echo $GLOBALS[$class]->output[$i]['text']; ?></div>
        <div class="lineTitle larger forward"><?php echo $GLOBALS[$class]->output[$i]['title']; ?></div>
    </div>
    <br class="clearBoth" />
    <?php ?>
    Would I need to do a loop, which possibly would look for the word 'Discount' and possibly add a space (&nbsp;) to those that don't have that word? so they all line up correctly?

    Thanks

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Aligning Shoping Cart Values

    What version are you using?

    As looking at this in a default 1.3.8a install - the alignment is correct and not as you posted
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Mar 2008
    Posts
    39
    Plugin Contributions
    0

    Default Re: Aligning Shoping Cart Values

    For some reason when I posted it, it didn't post how I wanted it to.

    Here is a screenshot of what's happening



    As you can see, the minus before the £ sign, pushes it to the right.

    I want it so all the £'s are aligned vertically.

    Thanks

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Aligning Shoping Cart Values

    What you posted does not look to be from Zen Cart

    Do you know how it looks in Zen Cart?
    As I stated the default is aligned and not affected by the minus sign.

    See it here:
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Mar 2008
    Posts
    39
    Plugin Contributions
    0

    Default Re: Aligning Shoping Cart Values

    It doesn't look like Zen Cart because I have customised it.

    I just don't understand why the minus is pushing it to the right, when everything is aligned right, rather than left.

    Any ideas?

 

 

Similar Threads

  1. Absolute Position Shoping cart
    By perfumbg in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Dec 2010, 09:24 PM
  2. Missing Shoping Cart
    By Bruce1952 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 28 Aug 2008, 10:30 AM
  3. displaying attributes in shoping cart sidebox.
    By HTsean in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Apr 2008, 04:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg