Jump to content

marcello

Members
  • Content count

    122
  • Joined

  • Last visited

  • Days Won

    3

Reputation Activity

  1. Like
    marcello reacted to auzStar in [Addon] Ajax Product Listing for osC 2.3.4 bootstrap   
    New version (v2.1) has been added to the add-on:
    http://addons.oscomm...9455/#tabs-hist
     
    ------------------------------------------------------------------------------
    CHANGES:
     
    bug fixes and improved handling of back and forward button during ajax requests
     
    ------------------------------------------------------------------------------
     
    Demo:
    http://www.auzcommerce.com.au/osc234bs_test/index.php?cPath=3_15

     
    cheers
  2. Like
    marcello got a reaction from radhavallabh in [Addon] Ajax Product Listing for osC 2.3.4 bootstrap   
    @auzStar
     
    Great news.  I'm glad the info was useful.  I'll do my best to test the new code when it's available.  Most important, thank you for your efforts.  :beers:
  3. Like
    marcello got a reaction from auzStar in [Addon] Ajax Product Listing for osC 2.3.4 bootstrap   
    @auzStar
     
    Wanted to say that this is a great idea.  :thumbsup:  I haven't been able to test it on my own site; however, I noticed that the demo site experiences this issue when using the Back button on the browser. 
     
    It appears that Html5 does have a possible solution that update the browser to reflect the change made with the ajax selection.  I came across an article that explains in more details.
     
    http://www.codemag.com/Article/1301091
     
    Hope this is helpful and something of interest.
  4. Like
    marcello got a reaction from raiwa in KissIT Image Thumnailer   
    That's great Rainer.  Every bit counts.  Some stats for reference.  The transparent feature improved several thumbnails sizes to reduce a category page with 12 products by 4k.  This saved 3 requests when loading a page.  It may be insignificant to some; however, every bit counts.  I am grateful for your efforts.  PM me if you need any help with this.  I am more than happy to help where ever I can.
  5. Like
    marcello got a reaction from douglaswalker in 2.3.4 BS EDGE auto-update quantity in shopping_cart.php   
    Only because I find it easier to work with modules.  I know this is only test code but figured I'd share what I have.  Still having issues with my install on dev; however, this bit of code does work well in the testing I have done and addresses the issue nicely.  As always, all credit goes to @@burt
     
    \includes\modules\header_tags\ht_shopping_cart_qty_ajax.php
    <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ class ht_shopping_cart_qty_ajax { var $code = 'ht_shopping_cart_qty_ajax'; var $group = 'footer_scripts'; var $title; var $description; var $sort_order; var $enabled = false; function ht_shopping_cart_qty_ajax() { $this->title = MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_TITLE; $this->description = MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_DESCRIPTION; if ( defined('MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_STATUS') ) { $this->sort_order = MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_SORT_ORDER; $this->enabled = (MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_STATUS == 'True'); } } function execute() { global $PHP_SELF, $oscTemplate; if (basename($PHP_SELF) == 'shopping_cart.php') { $output = <<<EOD <script type="text/javascript"> $('input[name="cart_quantity[]"]').change(function() { var f = $('form[name="cart_quantity"]'); $.ajax({url : $(f).attr('action'), type: 'POST', data: $(f).serialize()}); });</script> EOD; $oscTemplate->addBlock($output, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Shopping Cart Qty Ajax', 'MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_STATUS', 'True', 'Do you want to enable the system to auto update shopping cart qty when customer leaves shopping cart without clicking the update button?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_STATUS', 'MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_SORT_ORDER'); } } ?> \includes\languages\english\modules\header_tags\ht_shopping_cart_qty_ajax.php
    <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ define('MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_TITLE', 'Shopping Cart Qty Ajax'); define('MODULE_HEADER_TAGS_SHOPPING_CART_QTY_AJAX_DESCRIPTION', 'Enable the system to auto update shopping cart quantity when customer leaves shopping cart without clicking the update button'); ?>
  6. Like
    marcello got a reaction from dinera in Featured Products BS   
    @Tsimi I created a content module for the index page.  I'll upload once I finish cleaning up. 
  7. Like
    marcello reacted to raiwa in KissIT Image Thumnailer   
    @@marcello,
     
    Instruction doc:
    NOTE: The watermark support included in Version 14 will only work correct on jpg, indexed png and indexed gif images.
              It will not work correct (white instead transparent background) for RGB png images.
     
    In any case I would recommend to do testing with jpg images in a reasonable size. The small demo images are not the size which would be used in a live store I guess.
  8. Like
    marcello reacted to raiwa in KissIT Image Thumnailer   
    Hello @@marcello, @@vampirehunter, @@Mort-lemur, @@greasemonkey and others,
     
    I found a way to apply watermarks to the big product images used in the color box pop up on the product info page.
    I also added the alt and title tag for the big images with the product name plus pi image number.
    Here the modifications if you wish to give it a try before I upload the update:
     
    In product_info.php lines 125+126 and lines 137+140 are changed.
     
    In includes/modules/kiss_iomage_thumbnailes/classes/Image_Helper.php lines 78-84 are changed.
    It is modified to force thumbnail generation even if the required image size is equal to the original image size if watermark is set bigger than zero.
     
    Please see attached files.
     
    Let me know what you think.
     
    Thank you and kindest regards
    Rainer
  9. Like
    marcello got a reaction from raiwa in [Contribution] Recently Viewed Products(sales optimized)   
    @@raiwa
     
    Completely agree.  Just as of now, products_description is added to the query based on the if statement; however, it is referenced as a established variable a few lines later.  I was just bringing attention to this. 
     
    I like your method as it was more simplified than what I came up with; however, this may break the system.  If you click on product #13, it will remove any product that starts with 13.  For example, product #133 would get merged with the product before by appending #3 to the end.  The following is what I came up with.  Several more lines of code though.
     
            if ($recently_viewed_string == '') { // No other products
              $recently_viewed_string = (string) $products_id; // So set the variable to the current products ID
            } else {
              if (strstr($recently_viewed_string,',')) {
                $recently_viewed_array = explode (',', $recently_viewed_string);
                if (!in_array ($products_id, $recently_viewed_array) ) {
                  $recently_viewed_string = $products_id . ',' . $recently_viewed_string; //Add the products ID to the beginning of the variable
                } else {
                  $recently_viewed_string = "";
                  foreach($recently_viewed_array as $existing_recently_viewed) {
                    if ($products_id != $existing_recently_viewed) $recently_viewed_string .= ($recently_viewed_string == '' ? '' : ',') .$existing_recently_viewed; //Add the products ID to the beginning of the variable
                  }
                  $recently_viewed_string = $products_id . ',' . $recently_viewed_string; //Add the products ID to the beginning of the variable
                }
              } else {
                $recently_viewed_string = $products_id . ',' . $recently_viewed_string; //Add the products ID to the beginning of the variable
              }
            }
     
    Last, regarding header_tags or footer_scripts.  I didn't see any output to the catalog side so I was just curious.
  10. Like
    marcello got a reaction from raiwa in [Contribution] Recently Viewed Products(sales optimized)   
    @raiwa
     
    A few more things:
     
    includes\modules\header_tags\ht_recently_viewed.php
     
    line 50:
     
    $output =   
     
    recommend
     
    $output = '';
     
     
    Also, in file includes\modules\content\product_info\cm_pi_recently_viewed.php
     
    It looks like you are referencing a variables $product_check on line 56:
     
          if ($product_check['total'] > 0) { //We don't want to add products that don't exist/are not available
     
    Due to the variable not existing, the if statement will always be null so the lines 56 thru 83 can just be removed.
     
     
    It appears that you have several configurable options (MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_SHOW_DESCRIPTION and others); however, when defining the array they may not exist.  I would recommend the following changes:
     
    Current Lines 116 to 137
     
            $products_query .= "     from products_description pd,
                                          products p
                                left join specials s
                                     on p.products_id = s.products_id
                                  where p.products_id in (" . $recently_viewed_string . ")
                                    and p.products_status = '1'
                                    and p.products_id = pd.products_id
                                   and pd.language_id = '" . (int) $languages_id . "'
                                ";
            $products_query = tep_db_query($products_query);                            
            while ($products = tep_db_fetch_array ($products_query) ) {
                $products_id = $products['products_id'];
                $products_name = tep_get_products_name($products['products_id']);
                $products_specials_price = tep_get_products_special_price($products_id);
                $products_data[$products_id] = array ('id' => $products_id,
                                                      'name' => $products_name,
                                                      'description' => $products['products_description'],
                                                      'image' => $products['products_image'],
                                                      'price' => $products['products_price'],
                                                      'specials_price' => $products_specials_price,
                                                      'tax_class_id' => $products['products_tax_class_id']
                                                           );
     
    should be modified to:
     
            $products_query .= "     from products_description pd,
                                          products p
                                  where p.products_id in (" . $recently_viewed_string . ")
                                    and p.products_status = '1'
                                    and p.products_id = pd.products_id
                                   and pd.language_id = '" . (int) $languages_id . "'
                                ";
            $products_query = tep_db_query($products_query);                            
            while ($products = tep_db_fetch_array ($products_query) ) {
                $products_id = $products['products_id'];
                $products_name = tep_get_products_name($products['products_id']);
                $products_data[$products_id] = array ('id' => $products_id,
                                                      'name' => $products_name
                                                           );
                                                      if (MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_SHOW_DESCRIPTION == 'True')
                                                        $products_data[$products_id]['description'] = $products['products_description'];
                                                    
                                                      if (MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_SHOW_IMAGE == 'True')
                                                        $products_data[$products_id]['image'] = $products['products_image'];
                                                                                   
                                                      if (MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_SHOW_PRICE == 'True') {
                                                        $products_data[$products_id]['tax_class_id'] = $products['products_tax_class_id'];
                                                        $products_data[$products_id]['price'] = $products['products_price'];
                                                        $products_data[$products_id]['specials_price'] = tep_get_products_special_price($products_id);
                                                      }
     
     
    Note that you are joining the specials to the product query; however, you are using the tep_get_products_special_price.
     
    Again, these are just recommendations.  I have only tested the product_info module and all appears to work as described with the changes I have suggested.
  11. Like
    marcello got a reaction from raiwa in [Contribution] Recently Viewed Products(sales optimized)   
    @raiwa - great addon.  I'm testing it out now.  Please note this minor typo. Otherwise, everything integrates easily.
     
    catalog\includes\modules\content\product_info\cm_pi_recently_viewed.php
     
    line 250:
     
          tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Reviews Module', 'MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_STATUS', 'True', 'Should the recently_viewed block be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     
    should be:
     
          tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Recently Viewed Module', 'MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_STATUS', 'True', 'Should the recently_viewed block be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     
  12. Like
    marcello got a reaction from raiwa in [Contribution] Recently Viewed Products(sales optimized)   
    @raiwa - great addon.  I'm testing it out now.  Please note this minor typo. Otherwise, everything integrates easily.
     
    catalog\includes\modules\content\product_info\cm_pi_recently_viewed.php
     
    line 250:
     
          tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Reviews Module', 'MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_STATUS', 'True', 'Should the recently_viewed block be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     
    should be:
     
          tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Recently Viewed Module', 'MODULE_CONTENT_PRODUCT_INFO_RECENTLY_VIEWED_STATUS', 'True', 'Should the recently_viewed block be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
     
  13. Like
    marcello got a reaction from raiwa in KissIT Image Thumnailer   
    @@Rainer
     
    Hey there.  I was just testing out adding a class to an image that does not have width or height and noticed that the below line does not pass the info to the legacy tep_image.  This is 3 lines down from function tep_image
     
        if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters);
     
    suggested
     
        if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters, $responsive, $bootstrap_css );
     
  14. Like
    marcello got a reaction from ArtcoInc in Purchase without account for 2.3.4 and BS2334   
    I just created a branch off my github of 234BS Edge.
     
    https://github.com/crazy-colorado/Responsive-osCommerce/compare/master...crazy-colorado:PWA_Addon
     
    Didn't want to post an addon.  This should allow you to compare files.  Note that checkout_process didn't need to have the tep_redirect modified from the original file.
  15. Like
    marcello got a reaction from kymation in [Addon} Superfish Categories Box   
    Yo Jim.
     
    I noticed that bootstrap.min.css was appearing twice in the source code.  There is a ; in the template_top.php, line 32.  It was causing the css to be listed twice.
     
    <?php if ( !defined ( MODULE_HEADER_TAGS_THEME_SWITCHER_STATUS ) || MODULE_HEADER_TAGS_THEME_SWITCHER_STATUS != 'True' ); { ?>
     
    What's funny is it was making me scratch my head for a while since the line is very simple....until I took a few mins away from my screen and suddenly noticed that lil guy.  
×