Jump to content

Demitry

Members
  • Content count

    291
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    Demitry reacted to raiwa in [Contribution] Recently Viewed Products(sales optimized)   
    Upddated to Version 5.0.1 Phoenix
    https://apps.oscommerce.com/z7iA8&recently-viewed-products-bs
    Compatibility:
    Phoenix 1.0.2.x
    PHP: 7.0-7.3
    *********************************************************************************************************************
    This version has not been tested with earlier Phoenix versions.
    You will need to apply at least the following database update to use it with Phoenix 1.0.0.x or 1.0.1.x.:
    https://pastebin.com/Ed8B6nuT
    You may also need to update custom.css
    *********************************************************************************************************************
    Changes:        
             - modified "See More" button to show only if more recently products have been visited than number of recently products shown in module.
    Thanks to @Demitry for the suggestion
             - readded missing truncate text function in cm_sc_continue_recently_viewed.php shopping cart module
             - removed obsolete truncate text functions in box module
     
  2. Like
    Demitry reacted to 241 in Header Tags SEO   
    admin/includes/functions/header_tags.php line 104
    if (($fileSaved && $cntNewFiles) || (! $fileSaved && (count($existingFiles) != $cntNewFiles))) { count($existingFiles)
    Notice: Undefined variable: existingFiles
    Warning: count(): Parameter must be an array or an object that implements Countable
    $existingFiles is not an array or object
  3. Like
    Demitry reacted to MrPhil in Database Optimizer   
    Keep in mind that it's more than just changing function names mysql_ to mysqli_. Some parameter lists in the calls will also be changed, so you need to check those.
  4. Like
    Demitry reacted to Jack_mcs in Database Optimizer   
    Yes, it should be changed.
  5. Like
    Demitry reacted to Jack_mcs in Header Tags SEO   
    @DemitryThanks for those. I will make a note for the next version.
  6. Like
    Demitry reacted to Jack_mcs in Header Tags SEO   
    Thank you. I appreciate you taking the time to post this. The unreleased version has most, if not all, fixed already, I dost haven't had the time to get an update posted but do plan one for this year. In the meantime, please do post any problems you find.
  7. Like
    Demitry reacted to Jack_mcs in Do I need the Header tags/SEO Urls contributions for Bootstrap 2.3.4?   
    Actually, having the keyword in the url still matters for SEO. Not nearly as much as it used to but it does play a part. It can be quite important, in fact, if a link is posted somewhere to some image on your site, like in an advertising campaign, because the keyword is then in the alt tag which is still a ranking factor. And it could be argued that having a human-readable url will increase traffic, which is also a ranking factor. For example, if I was reading through some forum post and it said go here - http...com/free-stuff or go here http...com/index.php?cpath=12, I would be more inclined to click on the link that described where I was going. So while rewriting the url's is mainly for the benefit of the visitors to the site, it does have an affect on SEO and shouldn't be ignored.
  8. Like
    Demitry reacted to raiwa in Purchase without account for 2.3.4 and BS2334   
    Update uploaded:
    Purchase without account BS 3.0.5.
    Changes Version. 3.0.5
    - fix in admin/reviews.php to show guest reviews flagged. Thanks to @Demitry
  9. Like
    Demitry got a reaction from Tsimi in Featured Products BS   
    @Tsimi
    ...you put the "bro" in Lambros
    😀
    yeah man, ..that's exactly what I was trying to achieve and I'm not very good with SQL. Thank you for the help. I just tested this mod and it works as it should. If you want, you can add it to the next update release.
    Ok, so here is the complete mod to only show the "See More" button when the number of Featured Products exceeds the content limit set in admin for the particular module.
    I'm just going to use the index module for this sample, and this is for BS Edge. I'm not sure if there is a difference with other versions.
    /index/modules/content/index/cm_i_featured_products.php
    1)      FIND this code:
    if (tep_db_num_rows($featured_products_query) > 0) { // Show only if we still have products in the array ADD just ABOVE it:
    // this will show/hide the "See More" button $fp_count_query = tep_db_query("select count(*) as total from featured WHERE status = '1'"); $fp_count = tep_db_fetch_array($fp_count_query); $fp_btn = 'style="display:none;"'; if ($fp_count['total'] > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT) { $fp_btn = 'style="display:inline;"'; }  
    2)      FIND this code:
    $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? '  ' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm'):'')) . '</h3>'; REPLACE it with this:
    $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? '&nbsp;&nbsp;<span ' . $fp_btn . '>' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm') . '</span>':'')) . '</h3>';  
     
  10. Like
    Demitry got a reaction from Tsimi in Featured Products BS   
    @Tsimi
    ...you put the "bro" in Lambros
    😀
    yeah man, ..that's exactly what I was trying to achieve and I'm not very good with SQL. Thank you for the help. I just tested this mod and it works as it should. If you want, you can add it to the next update release.
    Ok, so here is the complete mod to only show the "See More" button when the number of Featured Products exceeds the content limit set in admin for the particular module.
    I'm just going to use the index module for this sample, and this is for BS Edge. I'm not sure if there is a difference with other versions.
    /index/modules/content/index/cm_i_featured_products.php
    1)      FIND this code:
    if (tep_db_num_rows($featured_products_query) > 0) { // Show only if we still have products in the array ADD just ABOVE it:
    // this will show/hide the "See More" button $fp_count_query = tep_db_query("select count(*) as total from featured WHERE status = '1'"); $fp_count = tep_db_fetch_array($fp_count_query); $fp_btn = 'style="display:none;"'; if ($fp_count['total'] > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT) { $fp_btn = 'style="display:inline;"'; }  
    2)      FIND this code:
    $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? '  ' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm'):'')) . '</h3>'; REPLACE it with this:
    $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? '&nbsp;&nbsp;<span ' . $fp_btn . '>' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm') . '</span>':'')) . '</h3>';  
     
  11. Like
    Demitry reacted to Tsimi in Featured Products BS   
    @Demitry
    Ok, I had a look at my specials code and it is not what you are looking for. Actually it is same as the see more button currently inside the Featured Products BS add-on.
    But I started to do some research and found a solution. It was easier than I thought.
    You need to use a select count(*) query to get the current total amount of featured products and you only want to get the ones that are set to f.status 1
    So this is what I came up with
    Open your index module featured file
    FIND:
    if (tep_db_num_rows($featured_products_query) > 0) { // Show only if we still have products in the array ADD BEFORE:
    $featured_count_query = tep_db_query("select count(*) as total from featured WHERE status = '1'"); $featured_count = tep_db_fetch_array($featured_count_query);
    Now you can use this here to hide/show the button.
    if ($featured_count['total'] > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT) { BUTTON CODE HERE } Let me know if that works for you.
  12. Like
    Demitry reacted to Tsimi in Featured Products BS   
    @Demitry
    I did something similar long time ago for my specials on the index page. Show a certain amount of specials on the index page and a button that says Show All which redirects to the specials.php page.
    I will have to dig it out since I don't remember which shop I did that for.
    Give me some time and I'll get back to you.
  13. Like
    Demitry reacted to raiwa in only customers who have purchased the product are allowed to submit a review   
    @Demitry, thanks, it may be good to add it here:
     
     
  14. Thanks
    Demitry got a reaction from puggybelle in Horizontal Categories Menu BS   
    @puggybelle
    Andrea,
    The font color is in the bootstrap.css file, but you should be fine if you add the following to your user.css file.
    /* changes the menu font color and background */ .navbar-default .navbar-nav > li > a { color: #fff; } .navbar-default .navbar-nav > li > a:hover { color: red; background-color: #eee; } .navbar-default .navbar-nav > li > a:focus { color: #fff; background-color: #0066cc; } Please note that these are colors I use and you would need to change them to those of your own. My menu links are set to white on a blue background and will change to red with a light gray background on hover. See screenshot below.
    I don't recommend changing these settings in the bootstrap.css file because you will need to regenerate the minified version of that file, as well as add those same changes to the two .map files. Adding this to the user.css file should be sufficient. And always remember to hard refresh (SHIFT CTRL R) the browser to view the new changes.

     
  15. Like
    Demitry reacted to Tsimi in Horizontal Categories Menu BS   
    @Demitry
    role="navigation" is stock bootstrap code. Not sure for what but it is used for the nav-bar element. Guess it can be removed for the horizontal menu.
    If the catMenu ID isn't used anywhere inside the css file or anywhere else you can remove it.
  16. Like
    Demitry reacted to ecartz in HeaderScroll addon - need help with default setting   
    According to Mozilla at https://developer.mozilla.org/en-US/docs/Web/API/Storage/getItem
    You can say instead: 
    // HeadScroll save checkbox state to session $(function(){ $('#scroll').each(function() { var $el = $(this); var $checked = sessionStorage.getItem($el.prop('id')); if ($checked === null) { sessionStorage.setItem($el.prop('id'), 'true'); } $el.prop('checked', sessionStorage[$el.prop('id')] === 'true'); }); $('#scroll').on('change', function() { var $el = $(this); sessionStorage[$el.prop('id')] = $el.is(':checked'); }); }); I haven't tried this.  This is just from looking at docs. 
  17. Like
    Demitry reacted to PandA.nl in Named anchor tags don't work?   
    Hmm.. stil not sure what the BASE HREF is good for, never used it before I entered the oscommerce world, but it might be there for a good reason. 
    You can also work around this problem by using this:

    <a href="<?php echo $_SERVER['REQUEST_URI']; ?>#top">Top</a>
    Works like a normal anchor tag (so without reloading the whole page), the session is retained, and you can keep the BASE HREF.
     
     
     
    @Jeremy: using the tep_href the whole page is reloaded after every click, or isn't it?
     
    @Amanda: You remind me, I have got to work on my languages switch :D
  18. Like
    Demitry reacted to Tsimi in Horizontal Categories Menu BS   
    Thanks @Demitry for helping out.
    I think what she means is, when you add the css code you posted it will also change the looks of the links within the navbar since those also use the same classes.
    Best would be to give it a new, unique class that only refers to that parent category link.
    For example;
    Inside the ..includes/classes/catmenu.php file
    FIND
     
    $root_link_title = '<span><span class="fas fa-list"></span>&nbsp;' . $link_title . '</span>'; REPLACE WITH
     
    $root_link_title = '<span class="parent"><span class="fas fa-list"></span>&nbsp;' . $link_title . '</span>'; We added the class parent for this example. Name it whatever you want later.

    Then add this to your user.css file
    .parent { color: red; } This should have changed the parent link color to red.
    Change the css code to whatever you like.
  19. Like
    Demitry got a reaction from Smoky Barnable in Ezsocial for osC2.3.4BS v1.0a   
    I just installed this addon and had the same issue with the font awesome icons not displaying. However, my challenge is slightly different, in that I upgraded my Font Awesome version to the latest version (v5.2.0).
    This requires slightly different code for some icons and other changes in CSS if that is what you choose to use to display those icons. The new font awesome changes in CSS did not work for me so, I changed the button link function to that of osC and adjusted some of the CSS button code. Even with these changes not all font awesome icon classes worked. As an example, here is what my Facebook sub-module file looks like.
    /includes/modules/social_login_modules/templates/facebook.php
    <style> .loginBtn-facebook { background-color:#4267b2; background-image:linear-gradient(#4267b2, #3B55A0); text-shadow:0 -1px 0 #354C8C; } .loginBtn-facebook:hover, .loginBtn-facebook:focus { background-color:#5B7BD5; background-image:linear-gradient(#5B7BD5, #4864B1); color:#fff; } </style> <div class="buttonSet buttonDiv"><?php echo tep_draw_button(MODULE_SOCIAL_LOGINS_FACEBOOK_PUBLIC_TEXT, 'fab fa-facebook-square fa-lg', tep_href_link('login_with_facebook.php'), 'primary', null, 'btn-lg loginBtn loginBtn-facebook'); ?></div>
    If you have v4.7.0 of Font Awesome, you would just change the font awesome class in that link code and I think you only have to remove the "b" (stands for brand) from "fab" so it would be fa fa-facebook-square fa-lg. The fa-lg is the sizing of the icon. A bit further in the link code is btn-lg, this is the Bootstrap code for the button size. There is also btn-md for medium and btn-sm for small, which is the default and does not need to be added.
    And it would be good for anyone using this addon to read the following article on the pros and cons of using social logins. One of the things I got out of this article is that you want to limit your social login options to 3 or 4. Having too many is not good.
    https://www.humix.be/blog/10-advantages-disadvantages-social-logins/

    As for selecting which social logins to use, here is an article on it with a list of top social media sites. Surprisingly, Google+, Twitter, and LinkedIn are not in the top 5.
    https://www.dreamgrow.com/top-15-most-popular-social-networking-sites/
     

  20. Like
    Demitry reacted to puggybelle in Horizontal Categories Menu BS   
    @Demitry - Thanks so much for all of that!
    Only one fly in the ointment.  The links at the very top of the website (navbar-inverse?) are now centering, as opposed to being right-justified as assigned in Admin > Modules > Navbar Modules.
    I tried putting text-align:right in user.css for the navbar-inverse (already have something there to control the background color) but it's not moving the links back over.
    Changed the font size, too, on my category links and that is also affecting the top navbar links like My Account and whatnot.  Any ideas?
    - Andrea
     
  21. Thanks
    Demitry got a reaction from puggybelle in Horizontal Categories Menu BS   
    @puggybelle
    Andrea,
    The font color is in the bootstrap.css file, but you should be fine if you add the following to your user.css file.
    /* changes the menu font color and background */ .navbar-default .navbar-nav > li > a { color: #fff; } .navbar-default .navbar-nav > li > a:hover { color: red; background-color: #eee; } .navbar-default .navbar-nav > li > a:focus { color: #fff; background-color: #0066cc; } Please note that these are colors I use and you would need to change them to those of your own. My menu links are set to white on a blue background and will change to red with a light gray background on hover. See screenshot below.
    I don't recommend changing these settings in the bootstrap.css file because you will need to regenerate the minified version of that file, as well as add those same changes to the two .map files. Adding this to the user.css file should be sufficient. And always remember to hard refresh (SHIFT CTRL R) the browser to view the new changes.

     
  22. Thanks
    Demitry got a reaction from puggybelle in Horizontal Categories Menu BS   
    @puggybelle
    hi Andrea,
    I'm not sure if this will work for your store, but this is what I used. Add this to your user.css file and after you upload it to the server, be sure to do a hard refresh (SHIFT CTRL R) of your browser. You have to do that every time you make any CSS change.
    /* this will center the menu links */ .navbar-nav { width:100%; text-align:center; } .navbar-nav > li { float:none; display:inline-block; } The font color and button colors are in the bootstrap.css file, I think. I'll look for it and get back to you.
     
  23. Like
    Demitry reacted to cDGo IT Consultancy in Mailchimp newsletter Everywhere add on   
    This is just a simplified version, but install the plugin as supposed and than add this:

    After:
      if (isset($_POST['action']) && ($_POST['action'] == 'process') && isset($_POST['formid']) && ($_POST['formid'] == $sessiontoken)) {
        $process = true;

    Add:
     if (MODULE_FOOTER_MAILCHIMP_STATUS == 'True' && isset($_POST['newsletter']) && $_POST['newsletter'] == 1) {
      include('ext/api/mailchimp_v3/MailChimp.php');
      $key = [your api key];
      $list_id = [your email list id];
      $array = array('email_address' => $_POST['email_address'],
            'merge_fields'  => array('FNAME' => $_POST['firstname'],
                'LNAME' => $_POST['lastname']),
            'status'        => 'subscribed');
     
      $MailChimp = new MailChimp($key);
      $result = $MailChimp->post('/lists/' . $list_id . '/members', $array);
     }

    Replace
    [your api key]            with your api key like '123456789'
    [your email list id]   with your email list id like '98765'
  24. Like
    Demitry reacted to radhavallabh in Horizontal Categories Menu BS   
    @raiwa
    Yes the thumbnailer is at work on the Categories menu when I switch the images on! On second load too it makes a little difference only..
    I guess you are right scope to improve time load with many images in menu does not seem possible.
    @Tsimi
    Yes I have 6 main categories and many subcategories and sub-sub categories due to which a huge load is summing up..
    @Demitry
    Thank for throwing light on this...Yes I guess using the images will not be possible for me now.. Hence will try doing without it!
     
    Thank you so much for guiding me on this.
    Warm Regds./
    radhavallabh
  25. Like
    Demitry got a reaction from valquiria23 in Shipping in cart without addon?   
    I realize this is an old thread, however,.. while redoing the Shipping Cost Estimator addon for BS Edge, I came across the same error message. See below:
    [08-Jun-2018 20:41:53 America/New_York] PHP Warning: Creating default object from empty value in /home/ ... /public_html/dev2/ship_estimator.php on line 90 I fixed it via this - in catalog/ship_estimator.php
    Find the following code (around line 90 to 92):
    $country_info = tep_get_countries($shipcountry, true); $order->delivery = array('postcode' => $shippostcode, 'country' => array('id' => $shipcountry, 'title' => $country_info['countries_name'], 'iso_code_2' => $country_info['countries_iso_code_2'], 'iso_code_3' => $country_info['countries_iso_code_3']), 'country_id' => $shipcountry, 'format_id' => tep_get_address_format_id($shipcountry)); Add just above it:
    require_once('includes/classes/order.php'); $order = new order; I tested it with different scenarios, both logged in and not, no errors at all.
    I hope this helps anyone who may stumble upon this thread in search for a solution.
    Demitry
     
     
×