Page 3 of 19 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 181
  1. #21
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    Hi Glenn,

    I had previously asked you about this in post 2:

    Very cool mod! Great, absolutely great readme file with clear and precise instructions and info - and here is the bonus, its not a text file!

    The only thing that I would like to customize about it is, I would like to format it into 2 columns. The first column being the # of items on the first row and the second row, the Total Price. On the second column on the first row is where I want to place the View Cart button.

    Can I do that via css? How? I'm a bit of a novice when it comes to css, so if someone can provide some example code, awesome!
    -----------------------------------------------------------------

    I took the code from post 4 and placed it in the file as you instruct. I changed the image name to that of mine. Now, however, it breaks the site, nothing under the header area, just white space!

    Can you take a look at my code and see if you can spot my error:

    PHP Code:
    <div id="cartCount">
    <?php
    $cart_count 
    $_SESSION['cart']->count_contents();

    echo (
    $cart_count'<a href="' zen_href_link(FILENAME_SHOPPING_CART'''SSL') . '" title="' CART_HEADER_TITLE '">':'') . CART_HEADER_IN_CART_PRE $cart_count . (($cart_count == 1)? CART_HEADER_IN_CART_SINGULARCART_HEADER_IN_CART_PLURAL) . ($cart_count'</a>''');
    ?>
    </div>
    <?php if ($cart_count) { 
      
    $_SESSION['cart']->get_products(); 
      
    $basket_total $_SESSION['cart']->show_total();
      echo 
    '<div id="cartTotal">' CART_HEADER_TOTAL $currencies->format($basket_total) . '</div>' 
    ?>
    <?php 
    echo '<a id="cartButton" href="' zen_href_link(FILENAME_SHOPPING_CART'''SSL') . '" title="' CART_HEADER_TITLE '"><img src="button_checkout.png" /></a>'); ?>
    Thank you,
    autoace

  2. #22
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    Hi Glenn,

    Last post is solved, just had to put php tags in the right place.

    I have since continued to customize it a bit and am trying to place my 'Go to Checkout' button at the top of the 2nd column and then to place a 'Checkout' button directly below that.

    I thought I had the right code for the 'Checkout' button, but it is not appearing

    Here is the code, the last line is the line I added for the new 'Checkout' button:

    PHP Code:
    <div id="cartCount">
    <?php
    $cart_count 
    $_SESSION['cart']->count_contents();

    echo (
    $cart_count'<a href="' zen_href_link(FILENAME_SHOPPING_CART'''SSL') . '" title="' CART_HEADER_TITLE '">':'') . CART_HEADER_IN_CART_PRE $cart_count . (($cart_count == 1)? CART_HEADER_IN_CART_SINGULARCART_HEADER_IN_CART_PLURAL) . ($cart_count'</a>''');
    ?>
    </div>
    <?php if ($cart_count) { 
      
    $_SESSION['cart']->get_products(); 
      
    $basket_total $_SESSION['cart']->show_total();
      echo 
    '<div id="cartTotal">' CART_HEADER_TOTAL $currencies->format($basket_total) . '</div>' 
    ?>
    <?php 
    echo '<a id="cartButton" href="' zen_href_link(FILENAME_SHOPPING_CART'''SSL') . '" title="' CART_HEADER_TITLE '"><img src="button_checkout.gif" /></a>'?><!--view cart button-->
    <?php echo '<a id="cartButton" href="' zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL') . '" title="' HEADER_TITLE_CHECKOUT '"><img src="button_buy_now.gif" /></a>'?><!--checkout button-->
    NOTE: I will be renaming them 'View Cart' and 'Checkout'
    Thank you,
    autoace

  3. #23
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    Hi Glenn,

    Please disregard posts 21 and 22, I was able to fix it.

    The one thing that has me stumped however, is how to have the buttons align evenly in the 2nd column (aligned at the top). And one last thing, currently the 2 buttons are on separate lines by use of 2 <br /> tags. Do you know how I could separate them by using css instead of <br /> tags?

    This is a great mod - I hope its included in ZC 2.0!

    Please feel free to PM me for a link to the site, its not officially open for business yet so its down to the public.
    Thank you,
    autoace

  4. #24
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    Would there be a way to always have 'Sub-Total' display with '$0.00' if there is nothing in the cart? For example, when a customer first appears on the site for the first time OR its been more than 30 days since they lasted visited the site.
    Thank you,
    autoace

  5. #25
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Shoppingcart/Freeship in Header support

    To remove the condition on showing the total, just comment out the two lines shown:
    PHP Code:
    <?php if ($cart_count) { 
      
    $_SESSION['cart']->get_products(); 
      
    $basket_total $_SESSION['cart']->show_total();
      echo 
    '<div id="cartTotal">' CART_HEADER_TOTAL $currencies->format($basket_total) . '</div>' 
    ?>
    PHP Code:
    <?php //if ($cart_count) { 
      
    $_SESSION['cart']->get_products(); 
      
    $basket_total $_SESSION['cart']->show_total();
      echo 
    '<div id="cartTotal">' CART_HEADER_TOTAL $currencies->format($basket_total) . '</div>' 
    //} ?>
    If you want to send a link, I'll look at your styling to align the buttons.

    You shouldn't have two <a id="cartButton" elements; they need different ids, both for valid code and to be able to style them separately.
    Last edited by gjh42; 17 May 2010 at 07:19 PM.

  6. #26
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    Good stuff.

    I tried to put 2 ids but with no success

    Please PM when you have a few minutes to look at the styling. I have my site 'down for maintenance' as its not officially open yet.
    Thank you,
    autoace

  7. #27
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    For the 2 buttons, I tried using #viewCart and #checkout as ids but couldn't seem to make it work. Any ideas?
    Thank you,
    autoace

  8. #28
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    Ok, making some progress here. Was able to separate the ids for the 2 buttons, now #viewCart and #checkout work - just need the styling help!

    Remember, just PM when you have a few minutes. Oops looking at the clock, I have to step away for a few hours. Should be back around 8pm (Im on the east coast as well) or so. If not, I'll look for you tomorrow. Thanks.
    Last edited by autoace; 17 May 2010 at 08:56 PM.
    Thank you,
    autoace

  9. #29
    Join Date
    Oct 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Shoppingcart/Freeship in Header support

    Thanks for a great module!! I did find a typo in the CSS that I spent lots of time pulling my hair out over and thought I would bring it up here to maybe save others some time!

    on line #749 has a ) instead of a } to close the line.

    Wrong:
    Code:
      cartCount a {)
    Corrected:
    Code:
      cartCount a {}
    Thanks again!!
    -Christopher

  10. #30
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Shoppingcart/Freeship in Header support

    Thanks for mentioning that - I'll get it into the original file so it is fixed when I next update the mod.

 

 
Page 3 of 19 FirstFirst 1234513 ... LastLast

Similar Threads

  1. Shoppingcart question
    By arbmil in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 29 Nov 2011, 06:34 PM
  2. freeship after discounts - code
    By makenoiz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Feb 2011, 09:50 PM
  3. Shopping Cart Totals in Header Support
    By georgiepants in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 8 Feb 2010, 04:23 PM
  4. Trying to Add Live Support to my Header
    By CoolCarPartsOnline in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 26 Sep 2008, 02: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