Jump to content
Latest News: (loading..)

Demitry

Members
  • Content count

    271
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Demitry

  1. Demitry

    Removing fake customers

    I think an easy way to get around bot creation of fake accounts or abuse of Tell A Friend page is to add in a script that requires the user to approve the account or email-send action via a button sent to their email. This is an added step, but you could spin it as it is designed to protect them (the customer). And a hacker or spammer is not going to use their own email account. This would not work for the Contact Us page, but if set up right, it will only execute the final account-submit or email-send action upon a human approval from the account of the email they used. It would likely require some A/B testing to see if an added step like this would have a significant negative impact on new account creations and Tell A Friend emails sent via real customers.
  2. hi Rainer, This is a small modification to this addon for anyone who wants to use it,.. and if you see value in it, you could add it to an update release. The mod is designed to only show the “See More” button if the number of recently viewed products exceeds the content limit of recently viewed products for each module. For example: if a customer viewed 4 or less products and the content limit is set to 4 recently viewed products, then it does not makes sense to have them see and click on a "See More" button that takes them to a Recently Viewed Products page containing the same 4 or less products that were listed on whatever page they were on. So, here are the changes and I’m only going to use the product_info page Recently Viewed module in this sample. This works in BS Edge. /includes/modules/content/index/cm_i_recently_viewed.php 1) FIND this code: // Set up the product data string in order by $recently_viewed_array if ($num_products > 0) { // Show only if we still have products in the array ADD just ABOVE it: // this will show/hide the "See More" button $rv_btn = 'style="display:none;"'; $rv_number_viewed = substr_count($recently_viewed_string, ",") + 1; if ($rv_number_viewed > MODULE_CONTENT_INDEX_RECENTLY_VIEWED_CONTENT_LIMIT) { $rv_btn = 'style="display:inline;"'; } 2) FIND this code: $recently_viewed_content .= '<h3 class="h3"><span itemprop="name">' . MODULE_CONTENT_INDEX_RECENTLY_VIEWED_TITLE . '</span>' . ((MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_MORE_BUTTON == 'True')? ' <a href="' . tep_href_link('recently_viewed.php') . '" class="btn btn-default btn-sm">' . MODULE_CONTENT_INDEX_RECENTLY_VIEWED_IMAGE_BUTTON_SEE_MORE . ' <span class="fa fa-angle-right"></span></a>' : '' ) . '</h3>'; REPLACE it with this: $recently_viewed_content .= '<h3><span itemprop="name">' . MODULE_CONTENT_INDEX_RECENTLY_VIEWED_TITLE . '</span>' . ((MODULE_CONTENT_INDEX_RECENTLY_VIEWED_SHOW_MORE_BUTTON == 'True')? '&nbsp;&nbsp;<span ' . $rv_btn . '>' . tep_draw_button(MODULE_CONTENT_INDEX_RECENTLY_VIEWED_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('recently_viewed.php'), 'primary', null, 'btn-default btn-sm') . '</span>':'') . '</h3>';
  3. @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>';
  4. @Tsimi yeah, no rush, whenever you can. The "See More" button for the featured products is already there. I'm just trying to condition it to only display when there are more products listed than are limited to display. I really just need to figure out how to get the total featured products listed. Once I have that key, the rest is cake.
  5. @Tsimi hi Lambros, I'm trying to add a modification to the modules for this addon, where the "See More" button does not display unless there are more featured products listed than are limited to display at any one time. ..because there is no point is sending the customer to the featured products page if they are seeing all of the featured products on whatever page they are on. The problem I'm having is getting the total number of featured products (for lets say, the index page module). It's probably right in front of me, I'm just missing that piece. For example: I condition to display that "See More" button only when the total number of featured products is > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT. I wanted to use tep_db_num_rows($featured_products_query), but that is set in the $query to always equal the content limit setting. I really appreciate any help on this. And it could be a good feature for an update. I'll gladly share it here once I get that mod working properly.
  6. I know that this is an old thread, however, because I recently solved this problem, I will share it here for anyone who is looking for the solution. The problem is that the variable $products_id is not defined. So,.... find this code at the top of product_reviews_write.php page, around line 31: if (!tep_db_num_rows($product_info_query)) { tep_redirect(tep_href_link('product_reviews.php', tep_get_all_get_params(array('action')))); } else { $product_info = tep_db_fetch_array($product_info_query); } and replace it with this: if (!tep_db_num_rows($product_info_query)) { tep_redirect(tep_href_link('product_reviews.php', tep_get_all_get_params(array('action')))); } else { $product_info = tep_db_fetch_array($product_info_query); $products_id = $product_info['products_id']; } This should make the error validation work properly. It did for me.
  7. @Tsimi ok, thank you for the explanation. As I mentioned, nothing seems to be off with menu display or functionality without those attributes. So, I think I will continue with them removed. Thanks again.
  8. @ecartz Matt, I apologize, I just saw your reply now. I have added myself as a follower of this post, but never got a notification of your reply, and I only noticed today that the heading title for this thread was in bold in my profile. Anyway, thank you so much for your rely and your solution. I tested it just now and it works Perfectly!!! That's exactly what I was looking for. Demitry
  9. hi, I need some help to solve an interesting code logic puzzle with an addon for header scrolling on the product_info.php page. This one: https://apps.oscommerce.com/eZbEr&headerscroll-for-oscv2-3-4-bs-edge This is a module for the product_info.php page where a customer can check the HeaderScroll checkbox and each time they load a product page, that page will load scrolled past the header. This spotlights the product offering with each product view and the customer has full control to enable or disable this feature for their session. ~~~~ What I have not been able to solve is how to set the HeaderScroll checkbox to be enabled (checked) by default when the customer’s session starts. The user’s checkbox input is stored in sessionStorage. I tried the most obvious… setting the checkbox $checked value to true,.. and I tried the same using jQuery on document ready, but with both of these tactics the checkbox only flashes checked for a split second and then applies the unchecked status from sessionStorage. The challenge is to possibly set sessionStorage to have the checkbox enabled, but only on the very first instance (product page visit). Otherwise it will always revert to being checked on each new product page load regardless of the customer’s preferred selection. Here is the jQuery for the sessionStorage part of this feature: // HeadScroll save checkbox state to session $(function(){ $('#scroll').each(function() { var $el = $(this); $el.prop('checked', sessionStorage[$el.prop('id')] === 'true'); }); $('#scroll').on('change', function() { var $el = $(this); sessionStorage[$el.prop('id')] = $el.is(':checked'); }); }); Any help would be greatly appreciated. PS: Please note that this is not a support thread for this addon. I’m just trying to get some assistance to improve it for the osC community.
  10. @Tsimi hi Lambros, While customizing my product_info page, I decided to run the W3C HTML Validator on that page. I got 22 errors and warnings, most of which are related to base osC software for BS Edge. However, there was an error and a couple of warnings related to this addon – see the screenshot below. I searched all of the addon files (css, js, classes, modules, templates) of the Horizontal Menu version I have (v1.3.1) for a reference or a defined value of that “catMenu” ID and could not find it. Same goes for role=”navigation” …I found nothing associated with it and am not sure what the role attribute does for the nav tag in that desktop menu. So, I removed these and tested both menus. Nothing seemed off and the menus work as they should. Is there a purpose for these attributes that I am not aware of? Or, is it ok to move forward without them? Thanks.
  11. Demitry

    Ezsocial for osC2.3.4BS v1.0a

    @frankl Frank, Thanks man, but seems like I'm the only one having this issue. So, no need to waste time on it. Thank you for all your help.
  12. Demitry

    Ezsocial for osC2.3.4BS v1.0a

    my lowest version for Upgrade All Calls is 2.7 and the other one is now only 3.1 I tried that 2.7, but no improvement, ..still getting the same error. I tested the validity of the redirect URI and that came back good. I don't know, ..I think I have to put it down and perhaps try it again when I have the site in production (off the sub-domain).
  13. Demitry

    Ezsocial for osC2.3.4BS v1.0a

    @frankl could it be the API version? I updated it to the latest v3.1 what is your's set at?
  14. Demitry

    Ezsocial for osC2.3.4BS v1.0a

    @frankl I tried replicating everything you have and unchecked all permissions, but not attributes,.. and I'm still getting the same error. The https may be the cause of it. or it may be that this is on a subdomain. I tried it with https setting, but my subdomain is not https. And it did not work in changing that callback URI to https. So, I don't know,.. maybe it's just not meant to be.
  15. Demitry

    Ezsocial for osC2.3.4BS v1.0a

    @frankl Thanks Frank, I hid my prior comment before seeing your reply. I appreciate the help. I cannot seem to get past the this error - see screenshot below. The thing is that I followed the instructions in the PDF but they did not work for me. So I Googled how to do this and found this set of instructions: https://auth0.com/docs/connections/social/facebook I had to register with https://auth0.com The http://your_site/your_folder/login_with_facebook.php for the callback URI does not work. So, according to autho.com instructions I tried their version of http://[MY AUTH0 USER NAME].auth0.com/login/callback and that does not work either. Has anyone run into this issue before and found a solution? No matter what I do, I get the same error when testing the login authentication.
  16. @Tsimi hi Lambros, Thanks for that. I figured Andrea was referring to the top navigation bar, but forgot that the BS code affects both since I don't use that bar.
  17. Demitry

    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/
  18. @puggybelle Andrea, Are you referring to the navigation bar at the very top of the page, because I don't use that on my site. I do use several of the sub-module buttons from it though. Could you pm me a screenshot of what you are referring to?
  19. @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.
  20. @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.
  21. Demitry

    Mailchimp newsletter Everywhere add on

    @cDGo IT Consultancy Thank you Domé, that does look interesting. I will add it and see how it works. Thank you for sharing that.
  22. Demitry

    Mailchimp newsletter Everywhere add on

    @cDGo IT Consultancy hi Domé, could you share what you did to make that change? Thanks.
  23. My current set-up: 2.3.4 BS Edge, PHP 7.2, MVS While working on creating a printable PDF Vendor Purchase Order (something osC must have, but does not), I came across an issue where product options do not reflect additional vendor cost. So, in admin/products_attributes.php you can add options and related retail cost per product, but when it comes to accounting for the additional vendor-related product costs for each selected option, there is nothing. There are several things to consider here. Some vendors have different item and/or model numbers for each product depending on additional options it contains. osC has one model number per product and additional options you can charge extra for. So, one way to resolve this would be to have the selected options dropdown option automatically change the product model number on the product_info.php page. To do this, there needs to be a modification made to the admin/categories.php page for each new product. One that pairs the option permutations available to each model number and vendor item number per product. Another way would be to add two more columns to the admin/products_attributes.php page Product Attributes table, next to that Value Price column. One column would allow to record the cost of the related added option, and another would be a dropdown to select the related vendor and/or change in item number. That would also have to be reflected via the vendor order email, PO, and the store’s accounting. This is challenging because different vendors use different ways for product inventory accounting and a retailer (such as an osC store) would be somewhat dependent on such an inventory accounting structure. I could not find any info or related addons to resolve this issue. And, I’d like to hear from anyone who found a solution or could help develop one.
  24. @radhavallabh Kavita, Just a note on nested directories and SEO. Search engine bots generally do not crawl 4th tier links. So, a good rule to adhere to when building your site structure, is to keep your most relevant pages at 3 tiers or less. So, the following structure would be as deep as you want to go with your most relevant pages. Category (tier 1) Sub-category (tier 2) Sub-subcategory (tier 3) Product pages If you have multiple nested directories, this is bad for SEO and relatedly, it becomes more confusing and overwhelming for the customer. Remember, each link the customer has to click is a conscious decision. The more decisions a customer has to make, the more complex the journey becomes to buying one of your products. And ideally it is best practice to keep categories, sub-categories, and sub-subcategories to 5 – 7 each (though you can have unlimited products in each category). This makes it easier for a customer to skim these categories. When you have too many categories, it’s human nature to skip over most if not all of them. If you have a lot of products, then you should focus on improving your site’s search feature. About a third of your visitors will go straight for the search bar, and even more if you have a ton of products to choose from.
  25. ok, my fault.. I thought it was not just category images, but an image for each product. Sorry about that. I use both, the horizontal menu and the thumbnailer, ..I just do not opt for displaying images in the menu for similar reason that Kavita mentioned.
×