Jump to content
Latest News: (loading..)

Demitry

Members
  • Content count

    171
  • Joined

  • Last visited

  • Days Won

    5

Demitry last won the day on December 10 2017

Demitry had the most liked content!

1 Follower

Profile Information

  • Real Name
    Demitry
  • Gender
    Male
  • Location
    Seminole, FL
  • Website

Recent Profile Visitors

5,779 profile views
  1. Multi_Vendor_Shipping new thread

    @kymation you and me both,.. I just caught a cold today. rushed to the store for OJ, zink, and coldeeze. ..been eating them by the hand-full. lol I've attached a copy of that checkout_shipping.php page. I was also having a bit of trouble with the structure between lines 201 and 218. MVS v1.3 and BS Edge are structured differently and I think I got it right. Please let me know if I did not. However, I don't think this part of the code is what's causing the session issue. checkout_shipping.php
  2. Multi_Vendor_Shipping new thread

    @kymation yep, I think it's a sessions issue. I just looked at my error_log and this is what I'm getting: [08-Feb-2018 03:08:40 America/New_York] PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in /home/..../public_html/dev2/includes/functions/sessions.php on line 110 I set Recreate Session to false and the problem still exists. Could this be a Unicode (utf8) issue? I'm not even sure how to check for that? I looked at the sessions directives in my php.ini file but cannot tell if any of them would cause this issue. Do you know if there is one that could cause this problem?,.. I mean I can get to that checkout_payment.php page when MVS is disabled.
  3. Multi_Vendor_Shipping new thread

    @kymation hey Jim, I've installed MVS v1.3 and updated it for my BS Edge site on PHP7.1.29 and I keep having an issue with getting logged out and redirected to the login page a few seconds after clicking the Continue button on the checkout_shipping.php page. So basically, it never loads the checkout_payment.php page. It just logs me out and sends me to the login.php page. When I log back in the items in the cart are still there and nothing has changed. It could be a sessions issue, but I'm not sure. I also have PWA and Get 1 Free addons installed. I've searched and tried various tests but nothing is working. When switching off MVS, the checkout_payment.php page loads. Do you know what could be the issue? and could you point me in the right direction? thanks.
  4. Shipping Bug - customers can get free shipping

    @burt Burt, Michael, I deleted that post for two reason: 1) from my prior correspondence it would seem that the issues I address are trivial and not related to the BS Edge forum ..even-though all issues I brought up exist in that version. 2) regarding the question I posed in the thread that I removed, ..my math was off because I switched the subtotal and total values. However, that still does not clarify why free shipping at order total should be calculated by subtracting the shipping cost from the total. Shipping cost can vary in amount and tax is state specific (in the US) and only charged for states where your company has a physical presence (such as a sales branch, warehouse, distribution center or HQ). If the free shipping is set at $150 then a customer should be able to get free shipping as soon as they reach that amount, as it has nothing to do with sales tax that would be added regardless of whether shipping was free or not. The shipping cost also has nothing to do in calculating the minimum amount to free shipping. And sales tax is not calculated on shipping cost, ..at least not in the US. So, I'm wondering,... shouldn't this code in /catalog/includes/modules/order_total/ot_shipping.php if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { $order->info['shipping_method'] = FREE_SHIPPING_TITLE; $order->info['total'] -= $order->info['shipping_cost']; $order->info['shipping_cost'] = 0; } look like this?: if ( ($pass == true) && ( $order->info['subtotal'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { $order->info['shipping_method'] = FREE_SHIPPING_TITLE; $order->info['shipping_cost'] = 0; }
  5. hi, I just downloaded the latest version of this USPS addon and in the /includes/classes/http.php file every single function starts with a capital first letter - as in "Function" vs. "function" Does this make any difference? I googled it but cannot find anything on this matter. The reason I ask is because DreamWeaver does not recognize anything other than a lower case version as a function per its color coding.
  6. Multi_Vendor_Shipping new thread

    @phi148 hi Bill, I found this MVS addon updated for osC 2.3.4 ..however, I have not installed it yet and am not sure what's involved in upgrading it to BS Edge. https://apps.oscommerce.com/w3a2E&mvs-v1-0
  7. hi, I wanted to share a solution I found to an issue that affected this contribution. I have an osC site running an older version (MS2.2) and I'm on a shared hosting account. My hosting company recently (Dec 5th) did an upgrade to their mariaDB and stopped supporting MySQL. This upgrade caused a number of accounts like mine to display a TEP STOP database error (Error 1366). The error was: 1366 - Incorrect integer value: '' for column 'customer_id' at row 1 in user_tracking table. I realize this is not related to this contribution, but please keep reading. To fix this error there were a number of solutions of which the most common was to change the sql_mode directive to an empty string in either the my.ini or the my.cnf file. However, with a shared hosting plan, I have no access to these files and my hosting company would not make the change for me because it would mean they would need to restart MySQL and this would affect all other accounts on that server. So, after finding the culprit of this error in /includes/functions/user_tracking.php and resolving it, I got another TEP STOP error and this one does have to do with this contribution. The error was 1364: 1364 - Field 'cart_contents' doesn't have a default value in the supertracker table. To fix this I applied the following SQL query in phpMyAdmin and it resolved the error. There were no others after that, ..at least not yet. ALTER TABLE `supertracker` CHANGE `cart_contents` `cart_contents` MEDIUMTEXT DEFAULT NULL My intent is to post this solution to help anyone else that may encounter this issue. I spent a lot of time trying to resolve this problem and hope to save that time for others. Demitry
  8. Mailchimp newsletter Everywhere add on

    Thank you Loic, One minor correction: Correction on 2) d) 2) /includes /modules/header_tags/ht_mailchimp.php d) FIND this code (for the header module): $(\'#messagehd\').html(resultmessage); // display the message $(\'#fnamehd\').val(""); // reset input field $(\'#lnamehd\').val(""); // reset input field $(\'#emailhd\').val(""); // reset input field REPLACE it with this: $(\'#messagehd\').html(resultmessage); // display the message $(\'#fnamehd\').val(""); // reset input field $(\'#lnamehd\').val(""); // reset input field $(\'#urlhd\').val(""); // reset input field $(\'#emailhd\').val(""); // reset input field e) FIND this code (for the footer module): $(\'#messageft\').html(resultmessage); // display the message $(\'#fnameft\').val(""); // reset input field $(\'#lnameft\').val(""); // reset input field $(\'#emailft\').val(""); // reset input field REPLACE it with this: $(\'#messageft\').html(resultmessage); // display the message $(\'#fnameft\').val(""); // reset input field $(\'#lnameft\').val(""); // reset input field $(\'#urlft\').val(""); // reset input field $(\'#emailft\').val(""); // reset input field The error there is the ending “hd” for header, and “ft” for footer in the field id’s. Basically, this is to correct my error above.. so that the header fields clear after submission. Like I said, I did not install or test the header Mailchimp module. Demitry
  9. Mailchimp newsletter Everywhere add on

    Spam Bot Trap Ok, so there are a number of different solutions to use for blocking spam bots from submitting garbage emails to your opt-in form, but the one I decided on was the bait-trap type. That entails creating a couple of fields that spam bots cannot resist,.. then hiding these fields from the human user using CSS. I then set up a conditional statement to filter the human user submissions from those of bots. The human submissions are added to the Mailchimp list and the bot submissions end up in the abyss of the digital world of 0’s and 1’s. All that, and a fake success message to reinforce the bot that their spam submission was actually added to the site’s email list. Don’t think that today’s bots need a confirmation message? ..never underestimate technology. Today’s spiders & bots are much more sophisticated and can determine when their submission was rejected. And that, may initiate a more sophisticated attempt at submitting spam data. I chose to use two types of fields (though one would likely be enough) and some tasty keywords that spam bots cannot help but salivate over. This spam bot trap install includes my instructions from a prior post on this forum thread that differentiates the customer success message via the store owner selecting to automatically add that submitted email to the list OR requiring a 2nd tier approval opt-in emailed to the end user. If you choose “pending” for that 2nd tier approval opt-in emailed to the end user, then you likely don’t need this spam bot trap. However, the more hoops you have a customer jump through, the less opt-ins you’ll have. The install instructions here are for the BS Edge footer module, however, the code changes are made to support the BS Edge header module as well. To add this to the header module you will need to make additional changes to the header module template (similar to those of the footer module template). I only tested this on the footer module and chose that one because I prefer to have this email opt-in in the footer on my site. The following 5 files will require changes. Be sure to BACK-UP your site files before making ANY changes to your site. 1) /includes/languages/english/modules/header_tags/ht_mailchimp.php FIND this line: define('MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE', 'Success! Please click the confirmation link that will be emailed to you shortly.'); REPLACE it with this: define('MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_PENDING', 'Success! Please click the confirmation link that will be emailed to you shortly.'); define('MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_SUBSCRIBED', 'Success! Your information was submitted.'); define('MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE', 'Success! Your contact information was submitted.'); Note: To make testing easier, I made the success message slightly different for MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE than that of the .. _SUBSCRIBED message. 2) /includes /modules/header_tags/ht_mailchimp.php a) FIND this code: function execute() { global $oscTemplate; ADD just after it: $email_optin_success = (MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE == 'pending' ? MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_PENDING : MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_SUBSCRIBED); // fake success message for bot opt-ins if (isset($_POST['url']) && $_POST['url'] == '' && !isset($_POST['terms_of_use'])) { $alert_type = 'danger'; $alert_msg = MODULES_HEADER_TAGS_MAILCHIMP_ERROR_MESSAGE; } else { $alert_type = 'success'; $alert_msg = MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE; } b) FIND BOTH instances of this: MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE REPLACE them with this: $email_optin_success c) FIND BOTH instances of this: resultmessage = \'<div class="alert alert-danger alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>' . MODULES_HEADER_TAGS_MAILCHIMP_ERROR_MESSAGE . '</div>\'; // display the message REPLACE them with this: resultmessage = \'<div class="alert alert-' . $alert_type . ' alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>' . $alert_msg . '</div>\'; // display the message d) FIND BOTH instances of this: $(\'#messagehd\').html(resultmessage); // display the message $(\'#fnamehd\').val(""); // reset input field $(\'#lnamehd\').val(""); // reset input field $(\'#emailhd\').val(""); // reset input field REPLACE them with this: $(\'#messageft\').html(resultmessage); // display the message $(\'#fnameft\').val(""); // reset input field $(\'#lnameft\').val(""); // reset input field $(\'#urlft\').val(""); // reset input field $(\'#emailft\').val(""); // reset input field 3) /includes /modules/content/footer/templates/footer_mailchimp.php FIND this code: <?php echo $form; if (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS) && (MODULE_FOOTER_MAILCHIMP_DISPLAY_NAME == 'True')) { echo tep_draw_input_field('firstname', NULL, 'id="fnamehd" placeholder="' . MODULE_FOOTER_MAILCHIMP_OPTIONAL . ENTRY_FIRST_NAME . '"') . ' '; echo tep_draw_input_field('lastname', NULL, 'id="lnamehd" placeholder="' . MODULE_FOOTER_MAILCHIMP_OPTIONAL . ENTRY_LAST_NAME . '"') . ' '; echo tep_draw_input_field('email', NULL, 'required aria-required="true" id="emailft" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email') . ' '; echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, 'fa fa-pencil-square-o', null, null, array('params' => 'id="SendButtonft"'), 'btn-success btn-sm'); } elseif (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS)) { echo tep_draw_input_field('email', NULL, 'required aria-required="true" id="emailft" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email') . ' '; echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, 'fa fa-pencil-square-o', null, null, array('params' => 'id="SendButtonft"'), 'btn-success btn-sm') . tep_draw_hidden_field('anonymous', 'anonymous'); } if (MODULE_FOOTER_MAILCHIMP_DISPLAY_PRIVACY == 'True') { echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_PRIVACY, 'fa fa-user', tep_href_link('privacy.php'), null, null, 'btn-info btn-xs pull-right'); } echo $endform; echo '<br><div class="message" id="messageft"></div>'; ?> REPLACE it with this: <?php echo $form; if ((MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS != '') && (MODULE_FOOTER_MAILCHIMP_DISPLAY_NAME == 'True')) { echo '<span class="website-url">Website URL:<br /><input type="text" name="url" id="urlft" placeholder="Website URL" /></span>'; echo tep_draw_input_field('firstname', NULL, 'id="fnameft" placeholder="' . MODULE_FOOTER_MAILCHIMP_OPTIONAL . ENTRY_FIRST_NAME . '"') . ' '; echo tep_draw_input_field('lastname', NULL, 'id="lnameft" placeholder="' . MODULE_FOOTER_MAILCHIMP_OPTIONAL . ENTRY_LAST_NAME . '"') . ' '; echo tep_draw_input_field('email', NULL, 'required aria-required="true" id="emailft" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email') . ' '; echo '<div class="accept-email-optin-terms">I accept the <a href="' . tep_href_link('terms_conditions.php') . '">Terms &amp; Conditions</a>: <input type="checkbox" name="terms_of_use" id="termsft" /></div>'; echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, 'fa fa-pencil-square-o', null, null, array('params' => 'id="SendButtonft"'), 'btn-success btn-sm'); } elseif ((MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS != '')) { echo '<span class="website-url">Website URL:<br /><input type="text" name="url" id="urlft" placeholder="Website URL" /></span>'; echo tep_draw_input_field('email', NULL, 'required aria-required="true" id="emailft" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email') . ' '; echo '<div class="accept-optin-terms">I accept the <a href="' . tep_href_link('terms_conditions.php') . '">Terms &amp; Conditions</a>: <input type="checkbox" name="terms_of_use" id="termsft" /></div>'; echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, 'fa fa-pencil-square-o', null, null, array('params' => 'id="SendButtonft"'), 'btn-success btn-sm') . tep_draw_hidden_field('anonymous', 'anonymous'); } if (MODULE_FOOTER_MAILCHIMP_DISPLAY_PRIVACY == 'True') { echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_PRIVACY, 'fa fa-user', tep_href_link('privacy.php'), null, null, 'btn-info btn-xs pull-right'); } echo $endform; echo '<br><div class="message" id="messageft"></div>'; ?> Note: if your Term & Conditions (or Terms of Use) file is named differently than terms_conditions.php, change the name of that file to that of your own (2 instances in the code above). 4) /ext/api/mailchimp_v3/subscribe.php FIND this code: if ( isset($_POST['anonymous'])) { $list_id = MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS; $merge_vars = [ 'FNAME' => '', 'LNAME' => '' ]; } else { $list_id = MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS; $merge_vars = [ 'FNAME' => $_POST['firstname'], 'LNAME' => $_POST['lastname'] ]; } $array = [ 'email_address' => $_POST['email'], 'merge_fields' => $merge_vars, 'status' => MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE ]; if (MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE == 'pending') { $status = 'pending'; } else { $status = 'subscribed'; } $MailChimp = new \MailChimp($key); // add the email to your list $result = $MailChimp->post('/lists/' . $list_id . '/members', $array); REPLACE it with this: if (isset($_POST['anonymous'])) { $list_id = MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS; $merge_vars = array('FNAME' => '', 'LNAME' => ''); } else { $list_id = MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS; $merge_vars = array('FNAME' => $_POST['firstname'], 'LNAME' => $_POST['lastname']); } $array = array('email_address' => $_POST['email'], 'merge_fields' => $merge_vars, 'status' => MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE); if (MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE == 'pending') { $status = 'pending'; } else { $status = 'subscribed'; } $MailChimp = new \MailChimp($key); // add the email to your list if (isset($_POST['url']) && $_POST['url'] == '' && !isset($_POST['terms_of_use'])) { // submit contact info when it is not a bot $result = $MailChimp->post('/lists/' . $list_id . '/members', $array); } else { // when it's a bot, leave out the path and list id $result = $MailChimp->post('', $array); } 5) /user.css ADD to the end of this file: .website-url, .accept-email-optin-terms { position:absolute; left:-20000px; } .accept-email-optin-terms { z-index:-100; } Note: You could add this code contained within the <style></style> tags at the top of the template file (file via #3 above), however, I believe it’s better to keep that CSS code outside of that template file. To test this feature, you will need to comment-out the CSS code in /user.css file OR, you could hold off adding that code in #5 (which will hide these two fields) until you complete testing the added spam bot-trap feature. The footer template form code also has a couple of error fixes same as the subscribed.php file. And I corrected the fields ID’s so that they clear upon submission. I tried using the tep_draw_input_field() for the Website URL field, but for some reason, it was not working for me. I have an idea as to why, but just did not want to waste more time fiddling with it. If anyone can find a way to improve this, please do so and share it. Demitry
  10. Mailchimp newsletter Everywhere add on

    Hey,.. just to follow up... From my prior post, ..those were arrays and though the module works with the current /exe/api/mailchimp_v3/subscribe.php file, this is the way this file should look. <?php /** * Gyakutsuki * subscribe.php * @copyright Copyright 2016 * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 * @version $Id: */ chdir('../../../'); require('includes/application_top.php'); include('ext/api/mailchimp_v3/MailChimp.php'); $key = MODULES_HEADER_TAGS_MAILCHIMP_API; if (isset($_POST['anonymous'])) { $list_id = MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS; $merge_vars = array('FNAME' => '', 'LNAME' => ''); } else { $list_id = MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS; $merge_vars = array('FNAME' => $_POST['firstname'], 'LNAME' => $_POST['lastname']); } $array = array('email_address' => $_POST['email'], 'merge_fields' => $merge_vars, 'status' => MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE); if (MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE == 'pending') { $status = 'pending'; } else { $status = 'subscribed'; } $MailChimp = new \MailChimp($key); // add the email to your list $result = $MailChimp->post('/lists/' . $list_id . '/members', $array); //send $result = json_encode($result); // If being called via ajax, run the function, else fail - console if ( MODULES_HEADER_TAGS_MAILCHIMP_DEBUG == 'True') { if ($_POST['ajax']) { var_dump($result); // send the response back } else { var_dump('Method not allowed - please ensure JavaScript is enabled in this browser'); } } else { echo $result; } I added spam bot-trap with my version and it works great!! Love this module! Demitry
  11. Mailchimp newsletter Everywhere add on

    I found another minor error. The footer template id names are ending with "hd" for header instead of "ft" for footer. All except the email field. What this does is, ...it does not clear the text fields after the contact info was submitted.
  12. Mailchimp newsletter Everywhere add on

    @Gyakutsuki Loic, The add-on works with PHP 7.1.7 ...that's what I am running the BS Edge on. The fix for the message issue is: 1) /includes/languages/english/modules/header_tags/ht_mailchimp.php ADD the following two definitions: define('MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_PENDING', 'Success! Please click the confirmation link that will be emailed to you shortly.'); define('MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_SUBSCRIBED', 'Success! Your information was submitted.'); 2a) /includes/modules/header_tags/ht_mailchimp.php FIND the following code (on line 57): function execute() { global $oscTemplate; ADD just below it: $email_optin_success = (MODULES_HEADER_TAGS_MAILCHIMP_STATUS_CHOICE == 'pending' ? MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_PENDING : MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE_SUBSCRIBED); 2b) in the same file FIND both instances of: MODULES_HEADER_TAGS_MAILCHIMP_SUCCESS_MESSAGE and REPLACE them with: $email_optin_success
  13. Mailchimp newsletter Everywhere add on

    @Gyakutsuki ok, I will, thanks. In testing the features of this addon, I found a minor issue that's an easy fix. When the option for "subscribed" is selected in Admin > Modules > Header Tags > Newsletter Mailchimp V3, and an email is submitted, the success message is the same as for "pending" which says that the customer is to "..click the confirmation link that will be emailed to you shortly." However with that "subscribed" option there is nothing emailed to the customer to verify their opt-in. I've only installed and am testing on the footer module.
  14. Mailchimp newsletter Everywhere add on

    @raiwa@Gyakutsuki Rainer: thank you for following-up to clarify that,.. though I’m not sure why there needs to be two input-fields for the same list number, but that’s really not an issue. Loic: thank you for the API update and the development SW recommendations. I’m not a developer by trade and got quite comfortable with Dreamweaver over the years. I just downloaded the VS Code for Windows and will install and check it out. I was a bit surprised that it’s free. I always appreciate a good recommendation from an expert in the field. Demitry
×