Jump to content



ArtcoInc

Member Since 31 Mar 2014
OFFLINE Last Active Today, 06:30
*****

Topics I've Started

PHP 7

21 March 2017 - 23:36

I know that there has been a lot of discussion about the changes needed for PHP 7. I also know that @burt and @BrockleyJohn have worked on this heavily, and are needing people to test their code.

 

I need to get a new site up soon, and I need it to be PHP 7 compatible, Unfortunately, I do not have the resources to assist @burt or @BrockleyJohn in their testing.

 

So, I'm putting out a plea ... can we get some testing done on this so that the PHP 7 changes can get rolled into the core?

 

Thanks!

 

Malcolm


Datepicker header tag

08 March 2017 - 02:28

I'm experimenting adapting an addon to 2.3.4 edge.

 

One file uses the datepicker, but the file is in a /catalog/includes/xxxxxxx sub-directory. Thus, it is not showing as an available file in the header tag admin screen.

 

How can I make the datepicker available to this file?

 

Thanks!

 

Malcolm


Different payment options by Customer

26 October 2016 - 21:37

Is there an add-on that offers different payment options by customer?

 

For example, I may want to offer an open account (ie: Net 30 terms) to some customers, but not to all of them. I'd like a way to enable (and disable) this flag in the customer's account (in admin), so that when they place an order, the "open account" payment option is available, but only if this flag is set.

 

While I'm thinking of it, it would also be nice to have an additional field in the orders table for an optional Purchase Order number.

 

Malcolm


Modular Navbar: Gold -> Edge

24 October 2016 - 20:39

@burt

#6 - Popup Cart for Navbar
 
Good for Edge (Modular Navbar Enabled).
Installing the Modular Navbar into Gold is easy. After that, this is then good for Gold too.

 

Where would I find Instructions for adding the Modular Navbar to Gold?

(this would be good info to include with the addon)

 

Malcolm


email address verification

27 September 2016 - 18:33

I am working on updating an older add-on, Newsletters Subscribers Manager

 

http://addons.oscommerce.com/info/8472

 

(As written, it uses a box in either the left column or right column, although I have revised it so it can also be a footer content module)

 

There is an entry field where the customer can enter their email address. The add-on uses its own javascript for verifying that the email address entered is valid.

    function execute() {
      global $oscTemplate;

$VerifierMailBoxe = '<script type="text/javascript">
   function VerifierMailBoxe(form) {
       if (form.emailsubscription.value == "" ) {
           alert("' . BOX_NEWSLETTER_ERROR_EMPTY_FIELD . '")
           form.emailsubscription.focus();
           return false;
          }

       else if (form.emailsubscription.value.indexOf(",") > 0) {
           alert("' . BOX_NEWSLETTER_ERROR_COMMA . '")
           form.emailsubscription.focus();
           return false;
          }

       else if (form.emailsubscription.value.indexOf(" ") > 0) {
           alert("' . BOX_NEWSLETTER_ERROR_SPACES . '")
            form.emailsubscription.focus();
           return false;
           }

       else if (form.emailsubscription.value.indexOf("@") < 0) {
           alert("' . BOX_NEWSLETTER_ERROR_SIGN . '")
           form.emailsubscription.focus();
           return false;
          }

       else if (form.emailsubscription.value.lastIndexOf(".") < 0) {
           alert("' . BOX_NEWSLETTER_ERROR . '")
           form.emailsubscription.focus();
           return false;
          }

       else if ((form.emailsubscription.value.length - 1) - form.emailsubscription.value.lastIndexOf(".") < 2) {
           alert("' . BOX_NEWSLETTER_ERROR . '")
           form.emailsubscription.focus();
           return false;
          }

       else {
          // form.submit()
           return true;
          }
   }
</script>';

      $data = $VerifierMailBoxe . '<div class="panel panel-default">' .
                                  '  <div class="panel-heading">' .
                                       MODULE_BOXES_NEWSLETTER_BOX_TITLE .
                                  '  </div>' .
                                  '  <div class="panel-body text-center">' .
                                       tep_draw_form('newslettersubscription', tep_href_link(FILENAME_NEWSLETTER_SUBSCRIPTION, '', 'NONSSL'), 'post', 'onSubmit="return VerifierMailBoxe(this);"') .                                        tep_draw_input_field('emailsubscription', '', 'placeholder="' . BOX_NEWSLETTER_TEXT_EMAIL .'" size="15" maxlength="50"') .
                                         tep_draw_button(IMAGE_BUTTON_NEWSLETTER_SUBSCRIPTION, 'glyphicon glyphicon-envelope', null, 'primary') .
                                  '    </form>' .
                                  '  </div>' .
                                  '</div>';

          $oscTemplate->addBlock($data, $this->group);
    }

While this works (sort of), I have found bad email addresses that pass the test. Besides, osC has its own built-in function, tep_validate_email(). So, I would like to revise this to use tep_validate_email(), but I have no idea how to do this. I have looked at other places that use this function ( such as create_account.php and account_edit.php ), but neither of these are boxes or modules. Can someone point me in the right direction?

 

TIA

 

Malcolm