Jump to content

burt

Team
  • Content count

    15,099
  • Joined

  • Last visited

  • Days Won

    626

Reputation Activity

  1. Like
    burt reacted to De Dokta in Responsive osCommerce - Bootstrap   
    Already discussed here and here. ;)
     
    J.J.
  2. Like
    burt reacted to GLWalker in Specials Module for osC Bootstrap build   
    Here's a super easy special module that follows the same layout as the new products module.  Im going to post the code here and let you put it together!
     
    It is so similar to the new products module, some may swear I just copied it and just changes 3 things! Maybe I did, maybe I didn't, maybe I used copy and paste, maybe I typed it all out. You will NEVER know.
     
    Step 1)
    Navigate to your catalog/includes/modules/ directory. Create a new .php file and name it specials.php
     
    Step 2) Open the new file and paste this inside:
    <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $special_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, products_price, if(s.status, s.specials_new_products_price, p.products_price) as products_special_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $special_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, products_price, if(s.status, s.specials_new_products_price, p.products_price) as products_special_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $num_special_products = tep_db_num_rows($special_products_query); if ($num_special_products > 0) { $special_prods_content = NULL; while ($special_products = tep_db_fetch_array($special_products_query)) { $special_prods_content .= '<div class="col-sm-6 col-md-4">'; $special_prods_content .= ' <div class="thumbnail">'; $special_prods_content .= ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $special_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $special_products['products_image'], $special_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; $special_prods_content .= ' <div class="caption">'; $special_prods_content .= ' <p class="text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $special_products['products_id']) . '">' . $special_products['products_name'] . '</a></p>'; $special_prods_content .= ' <hr>'; $special_prods_content .= ' <p class="text-center text-danger"><del class="text-muted">' . $currencies->display_price($special_products['products_price'], tep_get_tax_rate($special_products['products_tax_class_id'])) . '</del><br>' . $currencies->display_price($special_products['products_special_price'], tep_get_tax_rate($special_products['products_tax_class_id'])) . '</p>'; $special_prods_content .= ' <div class="text-center">'; $special_prods_content .= ' <div class="btn-group">'; $special_prods_content .= ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'products_id=' . $special_products['products_id']) . '" class="btn btn-default" role="button">' . SMALL_IMAGE_BUTTON_VIEW . '</a>'; $special_prods_content .= ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $special_products['products_id']) . '" class="btn btn-success" role="button">' . SMALL_IMAGE_BUTTON_BUY . '</a>'; $special_prods_content .= ' </div>'; $special_prods_content .= ' </div>'; $special_prods_content .= ' </div>'; $special_prods_content .= ' </div>'; $special_prods_content .= '</div>'; } ?> <h3><?php echo sprintf(TABLE_HEADING_SPECIAL_PRODUCTS, strftime('%B')); ?></h3> <div class="row"> <?php echo $special_prods_content; ?> </div> <?php } ?> Step 3)
    Open catalog/index.php
    Find in 2 areas:
    <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?> Depending what order you want to show the specials paste this in before or after the above:
    <?php include(DIR_WS_MODULES . 'specials.php'); ?> Step 4)
    Open catalog/includes/languages/* / index.php
     
    Add this line where ever you feel like:
    define('TABLE_HEADING_SPECIAL_PRODUCTS', '%s Specials!'); Done!
     
    Usage:
    If you want to limit the products that show, inside includes/modules/specials.php change MAX_DISPLAY_NEW_PRODUCTS  to any number desired.
     
     
  3. Like
    burt got a reaction from kymation in Responsive osCommerce - Bootstrap   
    Not sure how many more times I need to say this.
     
    This thread is not for support.  It is a discussion only thread.
     
    If you need support post it elsewhere, making sure to include all details, including HOW TO REPLICATE what you think is wrong.
  4. Like
    burt got a reaction from kymation in Responsive osCommerce - Bootstrap   
    Not sure how many more times I need to say this.
     
    This thread is not for support.  It is a discussion only thread.
     
    If you need support post it elsewhere, making sure to include all details, including HOW TO REPLICATE what you think is wrong.
  5. Like
    burt reacted to GLWalker in Responsive osCommerce - Bootstrap   
    products_attributes.php is done. Lots of changes html wise, as well as converting all forms, selects and inputs to use their respective functions. A few tables removed in favor of some switch/case actions.
     
    Will be committing to my admin branch in due time.
     
    #########################################################################################
     
    On another note, I have updated the BootStrap build to V2.3.4 - https://github.com/GLWalker/osCommerce-2334-bootstrap/tree/HEAD
     
    Ive updated the install file merging changes from V2.3.4 as well as adding in the newer header_tag modules in this Bootstrap build and turning on box modules.
     
    After installation it should be setup like the demo @ http://template.me.uk/2334bs3/
     
    Any and all testers would be great. I have sent a push request to merge this - so the more that can have a look, the better - there are lots of changes and Gary cannot do all the testing and looking at files alone.
     
    Besides the devs that can eyeball code, the easiest way to test is download the zip from https://github.com/GLWalker/osCommerce-2334-bootstrap/tree/HEAD  and install. 
     
    This update has no Bootstrap Admin files, but DOES include all admin file changes from the default 2.3.4 build.
  6. Like
    burt got a reaction from GLWalker in Responsive osCommerce - Bootstrap   
    :rolleyes:
     
    Installer is now bootstrapped and committed.  
  7. Like
    burt got a reaction from GLWalker in Combined Table by Price and Free Shipping for select items   
    Give eBooks zero weight.
    Remove zero weight products from the shipping cost.
    function getShippableTotal() { in /includes/modules/shipping/table.php 
    is what you need to amend to enable this, maybe someone else can give you the exact code you need or maybe you can work it out on your own.
  8. Like
    burt got a reaction from GLWalker in Responsive osCommerce - Bootstrap   
    :rolleyes:
     
    Installer is now bootstrapped and committed.  
  9. Like
    burt got a reaction from oscMarket in Responsive osCommerce - Bootstrap   
    @@kymation
     

    How is it going ? Do you have a Github Repo ?
  10. Like
    burt reacted to zpupster in Bootstrap 3 in 2.3 new products rows aligning   
    sorry,
     
     
    moving on.-- thanks for the bootstrap and all your effort.
     
    thanks again,
     
    craig
  11. Like
    burt reacted to Harald Ponce de Leon in Paypal Express - Seen New Error - Help Please   
    I just had a look at her files and there was a customization performed in currencies->calculate_price() that rounded the price to 10 decimal points instead of the currency decimal points value.
     
    That would explain the rounding issue.
  12. Like
    burt reacted to Harald Ponce de Leon in Paypal Standard Not Emptying Basket   
    Ok - with the help of Tsimi's sandbox account from Japan (with a Japanese address), I tracked down another problem relating to encoding that could fail the verification of the transaction if it contained special characters.
     
    The solution to this problem is to set your seller account profile to the same encoding as your shop (UTF-8 by default). In Tsimi's sandbox account it was set to Japanese / Shift_JIS.
     
    This can be set on the PayPal -> Profile -> Selling Preferences -> Language Encoding -> More Options page.
  13. Like
    burt got a reaction from mattjt83 in Guest Checkout options for v2.3.3 ?   
    I like the one that @@mattjt83 has coded. It is not free, but that is a good thing as it means you get a good product with good support.
  14. Like
    burt got a reaction from mattjt83 in Guest Checkout options for v2.3.3 ?   
    I like the one that @@mattjt83 has coded. It is not free, but that is a good thing as it means you get a good product with good support.
  15. Like
    burt reacted to Dan Cole in Responsive osCommerce - Bootstrap   
    @@burt
     
    Ahhh...a light comes on. Thanks Gary
  16. Like
    burt got a reaction from joli1811 in 2334bs3 - Change width of container but still be fluid   
    @@PupStar
     
    1.  set body to 960 width and margin auto.
    2.  set a media breakpoint of 960 and in this breakpoint set body 100%
    body { width: 960px; margin: 0 auto; } @[member=media] (max-width: 960px) { body { width: 100%; } } L2: simple to understand
    L3: likely means nothing to most readers, it simply centers the whole site
    L6: when the viewport is <= 960, (L7 - L8) body is set 100%, no need to center a 100% wide body.
     
    Look up breakpoints and get used to using them.
  17. Like
    burt got a reaction from joli1811 in 2334bs3 - Change width of container but still be fluid   
    @@PupStar
     
    1.  set body to 960 width and margin auto.
    2.  set a media breakpoint of 960 and in this breakpoint set body 100%
    body { width: 960px; margin: 0 auto; } @[member=media] (max-width: 960px) { body { width: 100%; } } L2: simple to understand
    L3: likely means nothing to most readers, it simply centers the whole site
    L6: when the viewport is <= 960, (L7 - L8) body is set 100%, no need to center a 100% wide body.
     
    Look up breakpoints and get used to using them.
  18. Like
    burt got a reaction from multimixer in 2334BS - Enhanced Contact Us   
    user.css
     

    #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; border-radius: 100px; text-align: center; padding-top: 35px; } #droppable { width: 250px; height: 150px; padding: 0.5em; float: left; margin: 10px; border-radius: 20px; }
     
    /includes/template_bottom.php (after the call to the jquery.js, approx line 45)
     

    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script src="ext/jquery/touch-punch.min.js"></script>
     
    includes/template_top.php after the endif approx line 42
     

    <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.22.css" />
     
    contact_us.php at the very end of the file after everything
     

    <script> $(function() { $("#draggable").draggable(); $("#droppable").droppable({ drop: function(event, ui) { console.log(ui.draggable.length); $(".submission").val(ui.draggable.data('text')); $(this).addClass("ui-state-highlight").find("p").html("You may now submit the form!"); } }); }); </script>
     
    same file, just above buttonset div
    note: I don't particularly like the idea for this block of code, but it's what I coded to test the concept, an input field set to display: none; that is required (thereby until it is filled out the form is impossible to submit), and can only be filled out by js trickery (moving the ball into the court)...
     

    <div id="draggable" class="ui-widget-content" data-text="submission"> <p>Drag me...</p> </div> <div id="droppable" class="ui-widget-header"> <p>Drop here...</p> </div> <?php echo tep_draw_input_field('test', NULL, 'required aria-required="true" style="display: none;" class="submission"'); ?> <div class="clearfix"></div>
     
    DONE!
     
    EXTERNAL SCRIPTS
     
    Now grab the external 3rd party script that allows the jqueryui to be swipeable, it's called "touch punch".
    Here is the code: https://raw.githubusercontent.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js - copy and paste that code into a new file called touch-punch.min.js and save this new file into /ext/jquery/
     
    Visit the contact us page and test it out.
     
    My conclusion:
     
    It is an interesting concept, and could potentially be a good way to stop bots dead...but does need some better "instructions" for the average user...and overall polishing. It's not something I would use on my own sites, I prefer the simple maths question.
  19. Like
    burt got a reaction from multimixer in 2334BS - Enhanced Contact Us   
    user.css
     

    #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; border-radius: 100px; text-align: center; padding-top: 35px; } #droppable { width: 250px; height: 150px; padding: 0.5em; float: left; margin: 10px; border-radius: 20px; }
     
    /includes/template_bottom.php (after the call to the jquery.js, approx line 45)
     

    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script src="ext/jquery/touch-punch.min.js"></script>
     
    includes/template_top.php after the endif approx line 42
     

    <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.22.css" />
     
    contact_us.php at the very end of the file after everything
     

    <script> $(function() { $("#draggable").draggable(); $("#droppable").droppable({ drop: function(event, ui) { console.log(ui.draggable.length); $(".submission").val(ui.draggable.data('text')); $(this).addClass("ui-state-highlight").find("p").html("You may now submit the form!"); } }); }); </script>
     
    same file, just above buttonset div
    note: I don't particularly like the idea for this block of code, but it's what I coded to test the concept, an input field set to display: none; that is required (thereby until it is filled out the form is impossible to submit), and can only be filled out by js trickery (moving the ball into the court)...
     

    <div id="draggable" class="ui-widget-content" data-text="submission"> <p>Drag me...</p> </div> <div id="droppable" class="ui-widget-header"> <p>Drop here...</p> </div> <?php echo tep_draw_input_field('test', NULL, 'required aria-required="true" style="display: none;" class="submission"'); ?> <div class="clearfix"></div>
     
    DONE!
     
    EXTERNAL SCRIPTS
     
    Now grab the external 3rd party script that allows the jqueryui to be swipeable, it's called "touch punch".
    Here is the code: https://raw.githubusercontent.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js - copy and paste that code into a new file called touch-punch.min.js and save this new file into /ext/jquery/
     
    Visit the contact us page and test it out.
     
    My conclusion:
     
    It is an interesting concept, and could potentially be a good way to stop bots dead...but does need some better "instructions" for the average user...and overall polishing. It's not something I would use on my own sites, I prefer the simple maths question.
  20. Like
    burt got a reaction from Tsimi in 2334BS - Categories above body?   
    You'd need to move the left column from the template bottom into the template top, and remove the push pull...
     
    What we have now CODE:
     
    Main Content (1) | Left Column (2) | Right Column (3)
     
    What we have now DISPLAY:
     
    Medium and Above:
     
    213
     
    Small and below
    123
     
    What you need CODE:
     
    213 at all times
  21. Like
    burt got a reaction from multimixer in 2334BS - Enhanced Contact Us   
    user.css
     

    #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; border-radius: 100px; text-align: center; padding-top: 35px; } #droppable { width: 250px; height: 150px; padding: 0.5em; float: left; margin: 10px; border-radius: 20px; }
     
    /includes/template_bottom.php (after the call to the jquery.js, approx line 45)
     

    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script src="ext/jquery/touch-punch.min.js"></script>
     
    includes/template_top.php after the endif approx line 42
     

    <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.22.css" />
     
    contact_us.php at the very end of the file after everything
     

    <script> $(function() { $("#draggable").draggable(); $("#droppable").droppable({ drop: function(event, ui) { console.log(ui.draggable.length); $(".submission").val(ui.draggable.data('text')); $(this).addClass("ui-state-highlight").find("p").html("You may now submit the form!"); } }); }); </script>
     
    same file, just above buttonset div
    note: I don't particularly like the idea for this block of code, but it's what I coded to test the concept, an input field set to display: none; that is required (thereby until it is filled out the form is impossible to submit), and can only be filled out by js trickery (moving the ball into the court)...
     

    <div id="draggable" class="ui-widget-content" data-text="submission"> <p>Drag me...</p> </div> <div id="droppable" class="ui-widget-header"> <p>Drop here...</p> </div> <?php echo tep_draw_input_field('test', NULL, 'required aria-required="true" style="display: none;" class="submission"'); ?> <div class="clearfix"></div>
     
    DONE!
     
    EXTERNAL SCRIPTS
     
    Now grab the external 3rd party script that allows the jqueryui to be swipeable, it's called "touch punch".
    Here is the code: https://raw.githubusercontent.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js - copy and paste that code into a new file called touch-punch.min.js and save this new file into /ext/jquery/
     
    Visit the contact us page and test it out.
     
    My conclusion:
     
    It is an interesting concept, and could potentially be a good way to stop bots dead...but does need some better "instructions" for the average user...and overall polishing. It's not something I would use on my own sites, I prefer the simple maths question.
  22. Like
    burt got a reaction from oscMarket in 2334BS - Enhanced Contact Us   
    Sometimes I get an idea in my head I cannot shake. I spent 10 minutes coding this:
     


     
    Thoughts ?
  23. Like
    burt reacted to Antonio Garcia in 2334BS Product image size   
    @@burt
     
    Yes, I will try to do this.
     
    I was so embarrassed about your comments that I try to solve this as soon as possible, spending almost 45 minutes of my work time writting the code without the help of an IDE and without check the code. Only to show that I ony try to be constructive and not destructive. :wub:
     
    Thanks for your understanding. :sweating:
  24. Like
    burt got a reaction from joli1811 in 2334BS Product image size   
    @@Antonio Garcia if you dont agree with how something works, easiest solution is for you to recode the offensive part, then post the code here so that a developer can take a look to decide if it is viable (in other words, well coded) and useable (ie useable for a majority of shops). At least have a go at coding, prior to talking, just to prove your point if nothing else.
  25. Like
    burt reacted to Harald Ponce de Leon in PayPal Standard v1.0 wrong tax calculation   
    Geoffrey, the changes gone into v3.1 of the module are not a bug fix but a minor improvement - the v3.0 module works perfectly fine.
     
    Please don't expect us to make releases after every minor code change we make.
×