Full service web hosting, great prices and support. Starts at $1.99/month!

View Poll Results: New Forum for Completed/Testing Site Reviews

Voters
13. You may not vote on this poll
  • Yes - Would be interesting

    13 100.00%
  • No - Get enough flaming from the clients!

    0 0%
Page 2 of 3 First 123 LastLast
Results 11 to 20 of 23

Thread: New Site Review Forum - any interest?

  1. #11
    osCMax Development Team

    New Site Review Forum - any interest?

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    81


    Red face Re: New Site Review Forum - any interest?

    JohnW,

    You are completely correct! Totally forgot about that little change I made to the application top.

    My code looks like this:

    Code:
    // customer adds a product from the products page
    // BOF: MOD - QT Pro
    //    case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
    //                              $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
          case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id']) && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id'])) {
            $attributes=array();
            if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^d{1,10}-d{1,10}(,d{1,10}-d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {
              $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
              foreach ($attrlist as $attr) {
                list($oid, $oval)=explode('-',$attr);
                if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
                  $attributes[$oid]=$oval;
              }
            }
            if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
              foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
                if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
                  $attributes=$attributes + $HTTP_POST_VARS['id'];
              }
            }
            $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+$HTTP_POST_VARS['quantity'], $attributes);
    // EOF: MOD - QT Pro
    Note the +1 in your code has been changed to +$HTTP_POST_VARS['quantity'].

    What were the 'glitches' - my html skills stop pretty much at cut and paste - so if you can tell me what to fix it would help. Thanks.

    Apologies for that - I really should document my changes properly!!

    Regards,
    Last edited by pgmarshall; 08-14-2009 at 12:13 AM. Reason: Typo
    pgmarshall
    _______________________________

  2. #12
    JohnW
    Guest


    Default Re: New Site Review Forum - any interest?

    PG, there is an extra " after id="product-quantity-{{product.id}}"
    Also, there is a </td> in the wrong place. I think it should be
    PHP Code:
                    <!-- ADDED PLUS AND MINUS BUTTONS PGM -->

                    <script type="text/javascript" src="javascript/plusminus.js"></script>
                        <td class="main" align="right" width="250">
                                <table width="200" border="0" cellpadding="0">
                                      <tr height="0">
                                        <td width="25"></td>
                                        <td width="25"></td>
                                        <td width="150">
                                      </tr>
                                      <tr>
                                        <td align="center"><img src="<?php echo DIR_WS_IMAGES .'icons/plus.png' ?>" onclick="TextBox_AddToIntValue('product-quantity-{{product.id}}',+1)" /></td>
                                        <td rowspan="2" align="center"><input name="quantity" type="text" class="moduleRow" id="product-quantity-{{product.id}}" style="text-align:center" onkeyup="changeQty('field');" value="1" size="2" maxlength="2" /></td>
                                        <td rowspan="2" align="right"><?php echo tep_draw_hidden_field('products_id'$product_info['products_id']) . tep_image_submit('button_in_cart.gif'IMAGE_BUTTON_IN_CART); ?></td>

                                      </tr>
                                      <tr>
                                        <td align="center"><img src="<?php echo DIR_WS_IMAGES .'icons/minus.png' ?>" onclick="TextBox_AddToIntValue('product-quantity-{{product.id}}',-1)" /></td>
                                      </tr>
                                  </table>
                        </td>


                    <!-- ADDED PLUS AND MINUS BUTTONS PGM -->
    Also, according to the w3c page javascript source code shouldn't be within the body tag.
    Code:
                    <script type="text/javascript" src="javascript/plusminus.js"></script>
    Last edited by JohnW; 08-17-2009 at 09:54 AM.

  3. #13
    JohnW
    Guest


    Default Re: New Site Review Forum - any interest?

    Hey, that app_top code was the missing key. I've got it working on my test site and I appreciate your help with this.

    FYI, you can make a product_info.js page to load only when you're on product_info.php and that way all the slimbox and this code only loads when on this page so your site runs faster. Did I explain that well? I've been working on having valid code that loads fast. Yslow addon for Firefox has been a big help. I do have one error on my main page right now but I'll get that fixed shortly. I had it error free but when I changed my doctype to
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    which takes the browser out of quirks mode it changed how it displayed so I had to do some work arounds but I'm not done.

  4. #14
    osCMax Development Team

    New Site Review Forum - any interest?

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    81


    Smile Re: New Site Review Forum - any interest?

    Hi JohnW,

    Glad you got it working - sorry I missed that bit out!

    Great idea on the selective loading of scripts ... How do you get the javscripts to only load on the required pages? I have got a growing list of javascript toys on my site and it does concern me that all this code is loading in the mainpage.tpl.php - ie. on every page!

    Is it simply a case of wrapping an if statement round the code? How do I detect the page type ... I can do the SSL pages ...

    Regards,
    pgmarshall
    _______________________________

  5. #15
    JohnW
    Guest


    Default Re: New Site Review Forum - any interest?

    For instance on catalog/product_info.php you would set it up like this. Note: I've modified mine and I'm not using mopics but you can adjust accordingly.
    PHP Code:
      $content CONTENT_PRODUCT_INFO;
      
    $javascript 'product_info.js'
    then I have a product_info.js file in includes/javascript/ that is
    Code:
    <link rel="stylesheet" href="templates/fallback/slimbox2.css" type="text/css" media="screen" >
    <script type="text/javascript" src="includes/js/jquery.min.js"></script>
    <script type="text/javascript" src="includes/javascript/slimbox2.js"></script>
    <script type="text/JavaScript">
    <!--
    function TextBox_AddToIntValue(targetId,addToValue)
    {
        var input = document.getElementById(targetId);
        var textInt = parseInt(input.value);
        if(isNaN(textInt))
        {
            textInt = 0;
        }
        input.value = textInt + addToValue;
        if (input.value <= 0) {
            input.value = 0;
        }
    }
    
    jQuery(function($) {
      $("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
        return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
      });
    });
    //-->
    </script>
    That has everything I want to call for that page including the slimbox css sheet.

    You can look at how advanced search is set up and use it as a guide.

  6. #16
    osCMax Development Team

    New Site Review Forum - any interest?

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    81


    Cool Re: New Site Review Forum - any interest?

    JohnW,

    Still not quite clear! But don't worry I will have a run throught the advanced search code ... now I have found YSlow I am now going through everything trying to optimise my site.

    YSlow addin for FF is awesome! Especially the Smush.it tool that compresses your images for you losslessly ... saving me 40%+ on my images!!

    Everyone needs to have this plugin.

    Might be worth a seperate post tell people to run Firebug and YSlow which could be stickied? (Michael)

    Regards,
    pgmarshall
    _______________________________

  7. #17
    JohnW
    Guest


    Default Re: New Site Review Forum - any interest?

    If you read through the Yslow pages I'm pretty sure you'll find some good info and it will help you out quite a bit. IMHO, every customer likes fast. Sometimes you might not get the chance to sell anything if your site takes too long to load.

  8. #18
    osCMax Development Team

    New Site Review Forum - any interest?

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    81


    Smile Re: New Site Review Forum - any interest?

    Sorry to bump!

    Come on guys - vote for this forum ... michael said he would only built it with 20 votes!

    (Michael - perhaps we could change 'Estabished Sites for Sale' - which has had no posts (ever!) to 'Established Sites for Testing/Feedback ... therefore no new forum required ... just a name change ...)

    Regards,
    pgmarshall
    _______________________________

  9. #19
    osCMax Development Team

    New Site Review Forum - any interest?

    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,517
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    pgmarshall     $ 35.00
    Rep Power
    81


    Wink Re: New Site Review Forum - any interest?

    Hey guys,



    (I know this is another bump! Apologies)

    I think we really need this forum ... all the other oscommerce variants have a live/test store list to show new users what is possible with the software and to get some constructive feedback on improvements.

    Please vote as Michael said he would only put it live if we got 20 votes ... 10 is not bad - but still not enough!

    Regards,
    pgmarshall
    _______________________________

  10. #20
    osCMax Development Team

    New Site Review Forum - any interest?

    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    4,164
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    ridexbuilder     $ 15.00
    Rep Power
    100


    Default Re: New Site Review Forum - any interest?

    templates/fallback
    Hmm, hard coded path - not good...
    Just a wee observation.

    Developers resource at bitbucket
    *** *** ***
    oscmax.co.uk / ejsolutions.co.uk
    Hosting plans with installation, configuration, contributions, support and maintenance.
    *** FREE osCmax hosting available ***
    oscmaxtemplates.com

Page 2 of 3 First 123 LastLast

Similar Threads

  1. No interest or monthly price and text
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-02-2009, 12:01 AM
  2. No interest or monthly price and text
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 12-31-2008, 06:00 PM
  3. forum mod?
    By winkscustoms in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 06-29-2005, 04:30 PM

Bookmarks

Bookmarks

Posting Permissions

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