Post by mtjhost » Tue Jul 25, 2017 2:39 am

Fatal error: Uncaught exception 'Exception' with message 'Error: Duplicate entry '63-1' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO oc_information_description SET information_id = '63', language_id = '1', title = 'Hi fdfdfd', description = '&lt;p&gt;dfdfdf dfdf dfd fd f df h ghghghg gh ghghghgh ghgghh&lt;/p&gt;\r\n', meta_title = 'Hi fdfdfd', meta_description = '', meta_keyword = ''' in /home/store/public_html/vqmod/vqcache/vq2-system_library_db_mysqli.php:40 Stack trace: #0 /home/store/public_html/vqmod/vqcache/vq2-system_storage_modification_system_library_db.php(73): DB\MySQLi->query('INSERT INTO oc_...', Array) #1 /home/store/public_html/vqmod/vqcache/vq2-admin_model_catalog_information.php(15): DB->query('INSERT INTO oc_...') #2 [internal function]: ModelCatalogInformation->addInformation(Array) #3 /home/store/public_html/system/vendor/multimerchlib/module/autogenerated/system/engine/oc_loader-2.3.php(179): call_user_func_array(Array, Array) #4 [internal function]: oc_loader->{closure}(Array, Arr in /home/store/public_html/vqmod/vqcache/vq2-system_library_db_mysqli.php on line 40


OC version 2.3.0.2 and having Multimerch installed with custom theme

New member

Posts

Joined
Wed Apr 30, 2014 12:37 am

Post by daniil_oc » Mon Oct 23, 2017 5:13 am

Hello!

I'm using shortcode for adding description to the similar products by using information pages

So, here's the code:

Code: Select all

<?php class ShortcodesCustom extends Controller {
  function info_content($atts) {
    extract($this->shortcodes->shortcode_atts(array(
       'id' => '',
    ), $atts));

    if ($id) {
      $this->load->model('catalog/information');
      $information_info = $this->model_catalog_information->getInformation($id);     
      if ($information_info) {
                $infotext = html_entity_decode($information_info['description'], ENT_QUOTES, 'UTF-8');
                return $infotext;
                }
            } else {
                return $content;
            }
  
    }
  }
?>
I'm doubtfull about the final part I took from the xml file. Is it legit? What $content should show? Maybe return ''; would be better?

Newbie

Posts

Joined
Mon Aug 19, 2013 4:05 am

Post by rempong » Thu May 26, 2022 8:51 pm

qahar wrote:
Wed Oct 02, 2013 10:52 am
OpenCart Shortcodes is a technique which makes it easy to insert advanced content into OpenCart. OpenCart shortcodes based on Wordpress shortcodes API and share similiar format.

Download - Demo - Github Repo - Documentation

Note: OpenCart 1.5.x can use Shortcodes v1.1.1

===================================

OpenCart Shortcodes is a library and set of modification to enhance OpenCart with shortcodes based on Wordpress API. Initial modification of WordPress Shortcodes API is done by rempong.

Based on his modification I'm creating more possibility to play with it. The package come with default shortcode and of course possibility to extend available shortcode. Right now I'm still develope it but it's ready for public test, expecting feedback.

Within download package I put sample code for quick test.
This is screenshoot of information page with the sample code:
quick-sample-code.jpg

For 3rd extensions/ theme developer who want to make their work Shortcodes ready, please refer to this docs.

Image
Update om, OC versi 4 sudah terbit...

OPENCART MODULE :
Opencart Compare Link Link your compared product to forum/email

Frontend Link From Admin Dashboard
Get link to product , category, manufacturer, information from admin backend.

Copy and DIRECTLY Edit Product the easy way.

Custom Product Sort Full control to product sorting options

Already Sold Product Module, shows total product sold


Active Member

Posts

Joined
Fri Sep 14, 2012 2:38 pm
Location - Indonesia
Who is online

Users browsing this forum: No registered users and 40 guests