Jump to content
Latest News: (loading..)

Gyakutsuki

♥Ambassador
  • Content count

    648
  • Joined

  • Last visited

  • Days Won

    13

Gyakutsuki last won the day on November 29 2016

Gyakutsuki had the most liked content!

Profile Information

  • Real Name
    Loic Richard
  • Gender
    Male
  • Location
    Montreal
  • Skype
    loic.richard

Recent Profile Visitors

41,407 profile views
  1. oscommerce and marketplace

    Osc is not a marketplace, but it can become if you some knowledge in development. My personal opinion, the 2.3.x is not the best solution to develop that in my sense. The 2.4 will be the best approach but for the moment it's in development. The problem is the delay, nobodies can say when it will be in production only HPDL.
  2. I have some error due to php7.2. It's time do becarefull if you want your code could use in the futur. 7.1 it will be a warning, 7.2 it's out. It's very strict. Notice: Use of undefined constant MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION - assumed 'MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION' in /home/www/test/oscommerce2/catalog/includes/modules/content/header/cm_header_catmenu.php on line 30 you must test if the define is correct before to use it. example (not in your case see below, just to show you, but if you use a constant inside the code and it's not defined, the script write an error. if (define('MODULE_CONTENT_HEADER_CATMENU_TITLE ) ) { } Now in your code you have that $this->title = MODULE_CONTENT_HEADER_CATMENU_TITLE; $this->description = MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION; $this->title = OSCOM::getDef('module_content_header_catmenu_title'); $this->description = OSCOM::getDef('module_content_header_catmenu_description'); delete $this->title = MODULE_CONTENT_HEADER_CATMENU_TITLE; $this->description = MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION; The problem is the same for your other contribution for : Notice: Use of undefined constant OSCOM_APP_FRANKL_PIRELATED_STATUS - assumed 'OSCOM_APP_FRANKL_PIRELATED_STATUS' in /home/www/test/oscommerce2/catalog/includes/OSC/Apps/FrankL/Related/Module/Content/PIRELATED.php on line 34 Now for catalog you have also other erro: notice: Undefined variable: result in /home/www/test/oscommerce2/catalog/includes/classes/catmenu.php on line 48 } elseif(isset($this->_data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level + 1))) { $result .= $this->root_start_string; Call Stack # Time Memory Function Location 1 0.0001 361664 {main}( ) .../index.php:0 2 0.0145 608120 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/template_top.php' ) .../index.php:63 3 0.0212 733680 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/header.php' ) .../template_top.php:48 4 0.0212 733680 oscTemplate->getContent( ) .../header.php:2 5 0.0217 807184 cm_header_catmenu->execute( ) .../osc_template.php:167 6 0.0217 823896 include( '/home/www/test/oscommerce2/catalog/includes/modules/content/header/templates/catmenu.php' ) .../cm_header_catmenu.php:42 7 0.0223 828088 build_hoz( ) .../catmenu.php:14 8 0.0224 829080 explode_category_tree->getExTree( ) .../cm_header_catmenu.php:122 9 0.0224 829080 explode_category_tree->_buildHoz( ) .../catmenu.php:88 notice: Undefined variable: result in /home/www/test/oscommerce2/catalog/includes/classes/catmenu.php on line 53 $result .= $this->child_start_string; Call Stack # Time Memory Function Location 1 0.0001 361664 {main}( ) .../index.php:0 2 0.0145 608120 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/template_top.php' ) .../index.php:63 3 0.0212 733680 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/header.php' ) .../template_top.php:48 4 0.0212 733680 oscTemplate->getContent( ) .../header.php:2 5 0.0217 807184 cm_header_catmenu->execute( ) .../osc_template.php:167 6 0.0217 823896 include( '/home/www/test/oscommerce2/catalog/includes/modules/content/header/templates/catmenu.php' ) .../cm_header_catmenu.php:42 7 0.0223 828088 build_hoz( ) .../catmenu.php:14 8 0.0224 829080 explode_category_tree->getExTree( ) .../cm_header_catmenu.php:122 9 0.0224 829080 explode_category_tree->_buildHoz( ) .../catmenu.php:88 10 0.0228 829656 explode_category_tree->_buildHoz( ) .../catmenu.php:76 Now in 7.2 the class has also a problem change var by public and also function by public function. Theses elements display the menu but does'nt resolve the problem above. 2.3 and add on will in horror in php 7.2 2.4 need just little modification to be completly compatible. +
  3. )Hi @MrPhil, Thank you for the explanation. .Ii don't use often the htaccess, just That I need but in this case, it just to secure the site. It's not perfect, that's why it's interesting to know other approach I have inserted this element in my production server, no problem (with ssl certificate). About GET and POST it can be other like FILE Also when you test your site with an online system (https://www.metaforensics.io/), it tells you for example if it's possible to know the server signature or not and also XSS problem and propose to solve with htaccess recommendation. After, depends of the apache configuration, the website can work or not.
  4. It's long time the french is not updated, You can find inside element in more and also element does not include inside with the new osc version. You must update in consequence.
  5. PHP Ver 5.4.45 ???

    you can test your site in local with Winamp server or example or easy php server. But you must have the same php version than you have in your future production. With that, you will see if your website works fine or not else it's better to go in commercial request topic and ask a financial proposition for the developer. the second way is to create a subdomain with your new php (htaccess or admin panel configuration) version and copy your files to this subdomain test.
  6. Admin to Bootstrap NO HTML changes

    I think it could be a temporary solution until the administration is converted into boostrap.
  7. Just for information, a little bug I have discovered. The solution <?php echo $oscTemplate->getAppsHeaderTags(); ?> must be before <title><?php echo HTML::outputProtected($oscTemplate->getTitle()); ?></title>
  8. Today a new tuto for 2.4

    1. radhavallabh

      radhavallabh

      Hi,

      Please do you have any idea on the date of the official release of the 2.4 version...I am so eagerly waiting for it..:smile:

      Awaiting your valued response..

      Warm Regds./

      radhavallabh

    2. Gyakutsuki

      Gyakutsuki

      I have no idea.

  9. Hello, I am continuing my investigations under osc 2.4 and my learning This tuto will help you to create a new header Tags approach inside OSC using the new concept in 2.4 App Currently, header tags is under includes/modules/header_tags. The goal is to include Header Tags inside the Apps. That's the goals to make. How to do that ? Currently, Osc 2.4 doesn't include this element. I don't know if @Harald Ponce de Leon want to include that inside OSC. The main advantage of this approach is to develop an APPS with all inside a directory and not to have all information everywhere inside the sites. It's just a little modification inside template.php. That's all to have something cool :) @Harald Ponce de Leon is to you to decide if you want to include this element inside App. How to do that ! ================================= Step 1 : Preparation of the elements including abstract and Interface 1-a includes/OM/Modules create a files called HeaderTags.php <?php /* * HeaderTags.php * @copyright Copyright 2008 - gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\OM\Modules; use OSC\OM\Apps; class HeaderTags extends \OSC\OM\ModulesAbstract { public function getInfo($app, $key, $data) { $result = []; $class = $this->ns . $app . '\\' . $data; if (is_subclass_of($class, 'OSC\OM\Modules\\' . $this->code . 'Interface')) { $result[$app . '\\' . $key] = $class; } return $result; } public function getClass($module) { list($vendor, $app, $code) = explode('\\', $module, 3); $info = Apps::getInfo($vendor . '\\' . $app); if (isset($info['modules'][$this->code][$code])) { return $this->ns . $vendor . '\\' . $app . '\\' . $info['modules'][$this->code][$code]; } } } 2-a includes/OM/Modules create a files called HeaderTagsAbstract.php <?php /* * HeaderTagsAbstract.php * @copyright Copyright 2008 - Gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\OM\Modules; use OSC\OM\Registry; abstract class HeaderTagsAbstract implements \OSC\OM\Modules\HeaderTagsInterface { public $code; public $title; public $description; public $sort_order; public $enabled = false; protected $db; abstract protected function init(); abstract public function getOutput(); abstract public function install(); abstract public function keys(); final public function __construct() { $this->code = (new \ReflectionClass($this))->getShortName(); $this->db = Registry::get('Db'); $this->init(); } public function isEnabled() { return $this->enabled; } public function check() { return isset($this->sort_order); } public function remove() { return $this->db->exec('delete from :table_configuration where configuration_key in ("' . implode('", "', $this->keys()) . '")'); } } 3-a includes/OM/Modules create a files called HeaderTagsAbstract.php <?php /* * HeaderTagsInterface.php * @copyright Copyright 2008 - Gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\OM\Modules; interface HeaderTagsInterface { public function getOutput(); public function install(); public function keys(); public function isEnabled(); public function check(); public function remove(); } ===================================== Step 2 Call the new class element inside template Edit includes/classes/osc_templates 1-a Just after use OSC\OM\Registry; add use OSC\OM\Apps; 2-a just before function addBlock($block, $group) { $this->_blocks[$group][] = $block; } Add public function getAppsHeaderTags() { if ( defined('MODULE_HEADER_TAGS_INSTALLED') && !is_null(MODULE_HEADER_TAGS_INSTALLED) ) { $header_tags_array = explode(';', MODULE_HEADER_TAGS_INSTALLED); foreach ($header_tags_array as $header) { if (strpos($header, '\\') !== false) { $class = Apps::getModuleClass($header, 'HeaderTags'); $ad = new $class(); if ( $ad->isEnabled() ) { echo $ad->getOutput(); } } } } } ===================================== Step 3 : Called inside your app the header tag I am supposing you have developped an app, there the main elements to include inside 3-a edit your oscommerce.json just below "modules": { add "HeaderTags": { "RSS": "Module\\HeaderTags\\RSS" }, 3-b Create a directory called - Module -- Headertags 3-c Create a files called RSS An full example about the rss header tags <?php /** * RSS.php * @copyright Copyright 2008 - Gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\Apps\Communication\PageManager\Module\HeaderTags; use OSC\OM\Registry; use OSC\OM\HTTP; use OSC\Apps\Communication\PageManager\PageManager as PageManagerApp; class RSS extends \OSC\OM\Modules\HeaderTagsAbstract { protected $lang; public $group; protected function init() { if (!Registry::exists('PageManager')) { Registry::set('PageManager', new PageManagerApp()); } $this->app = Registry::get('PageManager'); $this->lang = Registry::get('Language'); $this->group = 'header_tags'; // could be header_tags or footer_scripts $this->app->loadDefinitions('Module/Admin/header_tags/rss'); $this->title = $this->app->getDef('module_header_tags_rss_title'); $this->description = $this->app->getDef('module_header_tags_rss_description'); if ( defined('MODULE_HEADER_TAGS_RSS_STATUS') ) { $this->sort_order = (int)MODULE_HEADER_TAGS_RSS_SORT_ORDER; $this->enabled = (MODULE_HEADER_TAGS_RSS_STATUS == 'True'); } } public function isEnabled() { return $this->enabled; } public function getOutput() { $xml = $OSCOM_Template->addBlock('<link rel="alternate" type="application/rss+xml" title="' . STORE_NAME . '" href="index.php?Info&RSS'.'">', $this->group); $output = <<<EOD {$xml} EOD; return $output; } public function Install() { $this->app->db->save('configuration', [ 'configuration_title' => 'Do you want install this module ?', 'configuration_key' => 'MODULE_HEADER_TAGS_RSS_STATUS', 'configuration_value' => 'True', 'configuration_description' => 'Do you want install this module ?', 'configuration_group_id' => '6', 'sort_order' => '1', 'set_function' => 'osc_cfg_set_boolean_value(array(\'True\', \'False\'))', 'date_added' => 'now()' ] ); $this->app->db->save('configuration', [ 'configuration_title' => 'Display sort order', 'configuration_key' => 'MODULE_HEADER_TAGS_RSS_SORT_ORDER', 'configuration_value' => '210', 'configuration_description' => 'Display sort order (The lower is displayd in first)', 'configuration_group_id' => '6', 'sort_order' => '215', 'set_function' => '', 'date_added' => 'now()' ] ); } public function keys() { return ['MODULE_HEADER_TAGS_RSS_STATUS', 'MODULE_HEADER_TAGS_RSS_SORT_ORDER' ]; } } ===================================== Step 4 4-a Edit OSC/Sites/templates/Sail Just above (important) this code <?php echo $oscTemplate->getBlocks('header_tags'); ?> add <?php echo $oscTemplate->getAppsHeaderTags(); ?> I hope do not forgotten anything That'All !! Others tutos about OSC 2.4
  10. Import Reviews from other sites

    I think a lawyer will be the best for you to write or negotiate a contract. Take precaution.
  11. Import Reviews from other sites

    @MrPhil agree with that. I add just an information : At the time of social network, it could be dangerous to do that, impossible to follow and also if the master link is dead, that's can be a problem to verify the source.
  12. Import Reviews from other sites

    I don't know where you are located, but you must verified the law about that in your country. Best way for you.
  13. Import Reviews from other sites

    No you can't all the reviews must writen by yours customers.
  14. Import Reviews from other sites

    I don't think it's legal
×