Jump to content



Gyakutsuki

Member Since 30 Dec 2002
OFFLINE Last Active Today, 02:00
-----

#1750525 Introducing the Conversational Form : Futur of the web form ?

Posted by Gyakutsuki on 29 November 2016 - 14:04

What do you think, is it the futur to fill the form ? Curious to test and to have your return, opinion

 

How to integrate : an example

 

For 2.4 in includes/modules/login/template/login_form.php replace the line by tby this. Just add cf-form-element .

<?php echo HTML::form('login', OSCOM::link('login.php', 'action=process'), 'post', 'cf-form-element', ['tokenize' => true]); ?>

and add this script

<script type="text/javascript" src="https://rawgit.com/space10-community/conversational-form/master/dist/conversational-form.min.js" crossorigin></script>

It's possible also to customize to increase the relation with the customer.

 

That's all. very simple

 

For more information you can visit  : https://space10-comm...rsational-form/




#1750071 Time to get secure (if you haven't already)

Posted by Gyakutsuki on 17 November 2016 - 22:49

Tk for this information, it's important for some people to think a migration with a good provider or to integrate the ssl.




#1747307 2.4 Series

Posted by Gyakutsuki on 03 September 2016 - 14:51

I haven't to manage that just you can look this hook, it can help you.

Also there is function to delete a base but you can use for exemple this

          $Qdelete = $OSCOM_PDO->prepare('delete
                                          from :table_products_notifications
                                          where customers_id = :customers_id
                                          and products_id not in (:products_id)');
          $Qdelete->bindInt(':customers_id', $OSCOM_Customer->getID());
          $Qdelete->bindValue(':products_id', implode(', ', $products_parsed));
          $Qdelete->execute();

example : Hooks to open and close the shop

 namespace OSC\OM\Module\Hooks\Shop\AllShop;

  use OSC\OM\OSCOM;
  use OSC\OM\Registry;

  class StoreOffLine {

    private function install() {
      $OSCOM_Db = Registry::get('Db');

        $OSCOM_Db->save('configuration', [
            'configuration_title' => 'Do want to put the shop in maintenance ?',
            'configuration_key' => 'STORE_OFFLINE',
            'configuration_value' => 'false',
            'configuration_description' => 'Si true, your site will be in off line and the customer could not take an</i>',
            'configuration_group_id' => '1',
            'sort_order' => '23',
            'set_function' => 'osc_cfg_set_boolean_value(array(\'True\', \'False\'))',
            'date_added' => 'now()'
          ]
        );


        $OSCOM_Db->save('configuration', [
            'configuration_title' => 'Who is authorized to connect to the site when the shop is under maintenance',
            'configuration_key' => 'STORE_OFFLINE_ALLOW',
            'configuration_value' => '',
            'configuration_description' => '<br>Please specify your IP address or yours IP addresses. If you have multiple IP addresses, please follow the instructions in parentheses (Each IP must be separated by commas <br />ex: 127.0.0.1,222.0.0.5',
            'configuration_group_id' => '1',
            'sort_order' => '24',
            'set_function' => '',
            'date_added' => 'now()'
          ]
        );
      }
    }



    public function execute() {

/*
* install db
*/
      if (!defined(STORE_OFFLINE) == true || STORE_OFFLINE == null || empty(STORE_OFFLINE)) {
        $this->install();
      }

      if(STORE_OFFLINE == 'True') {

        $allowed_ip = false;
        $ips = explode(',', STORE_OFFLINE_ALLOW);

        foreach($ips as $ip) {
          if(trim($ip) == $_SERVER['REMOTE_ADDR']) {
            $allowed_ip = true;
            break;
          }
        }

        if($allowed_ip == false) {
          OSCOM::redirect('offline.html');
        }
      }
    }
  }



#1747297 2.4 Series

Posted by Gyakutsuki on 03 September 2016 - 12:47

Some Element can help you to update the modules: There are not all but it can help you to convert 2.3.x in 2.4

osc_output_string_protected ==> HTML::outputProtected()
osc_db_prepare_input ==> HTML::sanitize()
osc_draw_input_field() ===> HTML::inputField()
osc_href_link ===> OSCOM::link()
osc_redirect ====> OSCOM::redirect 
!osc_db_num_rows($product_info_query) ============> $Qcheck->fetch() === false
osc_db_num_rows($product_info_query) ============> $Qcheck->fetch() !== false

read db

        $Qcheck = $OSCOM_PDO->prepare('select id
                                       from table_administrators
                                       limit 1
                                      ');
        $Qcheck->execute();

        $Qcheck = $OSCOM_PDO->get('administrators', 'id', null, null, 1);

by

       $Qcheck = $OSCOM_Db->get('administrators', 'id', null, null, 1);
or 

    $Qzone = $OSCOM_PDO->prepare('select zone_code
                                 from :table_zones
                                 where zone_country_id = :zone_country_id
                                 and zone_id = :zone_id
                               ');
    $Qzone->bindInt(':zone_country_id', (int)$country_id);
    $Qzone->bindInt(':zone_id', (int)$zone_id );

Save in db

$OSCOM_Db->perform('customers', $sql_data_array, array('customers_id' => $OSCOM_Customer->getID()));

$OSCOM_Db->perform('customers_info', array('customers_info_date_account_last_modified' => 'now()'),
                                      array('customers_info_id' => $OSCOM_Customer->getID())
                           );
$OSCOM_Db->perform('customers', $sql_data_array, array('customers_id' => $OSCOM_Customer->getID()) );

=====>
$OSCOM_Db->save('customers', $sql_data_array, ['customers_id' => (int)$customer_id]);

$OSCOM_Db->save('customers_info', ['customers_info_date_account_last_modified' => 'now()'],
                                  ['customers_info_id' => (int)$customer_id]);


$OSCOM_Db->save('address_book', $sql_data_array, ['customers_id' => (int)$OSCOM_Customer->getID(),
                                                  'address_book_id' => (int)$customer_default_address_id]);

Update

 osc_db_query('update configuration
                set configuration_value = "' . trim($_POST['CFG_STORE_NAME']) . '"
                where configuration_key = "STORE_NAME"
               ');

 $OSCOM_Db->save('configuration', ['configuration_value' => $_POST['CFG_STORE_NAME']],
                                  ['configuration_key' => 'STORE_NAME']);

configuration module

osc_db_query("insert into configuration (
configuration_title, 
configuration_key, configuration_
value, configuration_description, 
configuration_group_id, 
sort_order, 
set_function, date_added) 
values (
'Display order ?', 
'MODULE_ADMIN_DASHBOARD_ORDERS_STATUS', 
'True',
 'Last order', 
'6',
 '1',
 ' ',
 now())");

by 

$OSCOM_Db->save('configuration', [
'configuration_title' => 'Display order ?',
'configuration_key' => 'ORDERS',
'configuration_value' => '',
'configuration_description' => 'Last order',
'configuration_group_id' => '6',
'sort_order' => '1',
'set_function' => '',
'date_added' => 'now()'
]);



#1747068 Observatory by mozilla : website analyse

Posted by Gyakutsuki on 27 August 2016 - 12:50

For information,you can test

 

https://observatory.mozilla.org/

Observatory by Mozilla is a project designed to help developers, system administrators, and security professionals configure their sites safely and securely.


#1746986 What is the biggest default / less of Oscommerce

Posted by Gyakutsuki on 24 August 2016 - 15:56

This topic has goal to evaluate where is the biggest default : ergonomie of oscommerce.

No to speak for example osc is not B2B, just focus on the original version / features who must be better

 

For me :

attributes is not perfect and must be upgraded via a variant product for example

categories/products in the same files : must be separated for best management

 

 




#1743895 A list of everything that goes in the <head> of your document

Posted by Gyakutsuki on 24 May 2016 - 12:58

If you want to know all about the head balise :

 

https://github.com/joshbuchea/HEAD

 

 




#1738709 osc 2.3.3.4 -Paypal login

Posted by Gyakutsuki on 30 January 2016 - 04:06

No i haven't, it's an error.

the return must be  : http://myshop//login...on=paypal_login




#1738582 Web Push Arrives In Firefox

Posted by Gyakutsuki on 27 January 2016 - 19:40

A new approach could be developped on shopping cart and Mozilla can help for that.

 

It'spossible to inform a consumer a new product,  a request ...

 

more information there.

 

https://hacks.mozill...-in-firefox-44/




#1736260 Development of OSC 2.4

Posted by Gyakutsuki on 20 November 2015 - 14:07

I know, it's diffifult for the community because there is no good communication in the time. That's always the same for more ten 10 years ago, I am on the forum.

We have an orientation for the 2.4, that's good ! The beginning was good and stop now since several month, I don't know Why, Maybe HPDL is too busy ? Mayby pb inside team, maybe wait boostrap 4, maybe...... can explain that. Just I can say, I discover a bug, and HPDL anwser me. He is listenning.

 

For the 2.4, it's a good thing, Osc can not continue in this orientation and bring lot of improvement and can help some people to do the transition with a new framework.

 

For the other, I understand nothing between the fork of Burt, gold, edge, official. Official is always official or burt is the official, the other seems doesn't exist ... I think the team must go back on one official release 2.3.5, I think with all the good things introduce for the release 2.3.3 or 2.3.4 (I don't remember). But on the main banch, we have 2.3 release with the 2.4, ah !!

 

My opinion

For moment, it's necessary to break and create  the futur framework and some project do that. It's good for developper, not for the seller but it's important to follow the techno and create at the moment a major release.

I agree with this orientation.

Also, php 7 need pdo, so the actual project can't continue to exist in this state.




#1733653 [Contribution] CKEditor with KFM Filemanager

Posted by Gyakutsuki on 08 September 2015 - 13:40

you can try this contribution : http://addons.oscommerce.com/info/9354


  • ce7 likes this


#1731376 Addon Development - Best Practices

Posted by Gyakutsuki on 11 July 2015 - 23:15

Some add-on has only HTTP, it could be a problem if the site is in SSL

 

insert this function in general.php and change 

HTTP_SERVER

 in the files by  

tep_type_url_domain()
/**
* Function to select HTTP or HTTPS
* public function
* @[member='Return'] $domain, type of HTTP of domain
*/
 function tep_type_url_domain() {
   global $request_type;
   $domain = substr((($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER), 0);
  return $domain;
}



#1714076 Easy Upload Module

Posted by Gyakutsuki on 02 February 2015 - 00:44

hello,

 

I created this contribution to help all the no programmers  to install easily a new module.

you can use this module for osc 2.3 but It will be very interesting for 2.4 and next.

 

To create a module is very easily.

 

example  for ht_hreflang.php

 

modules/header_tags/ht_hreflang.php
languages/modules/header_tags/ht_hreflang.php

 

Compress in zip and that's all.

the system has a security and you can't upload a file everywhere, just in modules and languages directory

 

if your server does'nt accept to write the files in the directory, just change the right on the directory in 777 and not on the files must be in 644.

 

I hope the community wiil accept this contribution and propose this installation process.

 

Tested on bootstrap gold.

 

Comment and return are welcome to improve the development

 

link to upload the module http://addons.oscommerce.com/info/9207




#1713538 Bootstrap Home Page Carousel Banner Slider Module Plugin Complete - Testing W...

Posted by Gyakutsuki on 24 January 2015 - 20:34

nice

 

Sugestion

 

change FILENMAE_REDIRECT BY redirect.php

and " . TABLE_CONFIGURATION . " by configuration

 

==> next release not include this element. It's better to do now andfor new contribution or update, I think  :-

 

if you want full size on image :

 

.item img {
background-color: #fff;
width:100%;
}




#1713072 How to build a content module

Posted by Gyakutsuki on 19 January 2015 - 16:33

Dan, the next release, I think,  delete the FILENAME constant

 

also for your script : $call_to_checkout .=

is 

$call_to_checkout =

 

+