Page 4 of 4
Re: OpenCart Shortcodes
Posted: Tue Jul 25, 2017 2:39 am
by mtjhost
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 = '<p>dfdfdf dfdf dfd fd f df h ghghghg gh ghghghgh ghgghh</p>\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
Re: OpenCart Shortcodes
Posted: Mon Oct 23, 2017 5:13 am
by daniil_oc
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?
Re: OpenCart Shortcodes
Posted: Thu May 26, 2022 8:51 pm
by rempong
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.
Update om, OC versi 4 sudah terbit...
Re: OpenCart Shortcodes
Posted: Mon Jul 15, 2024 7:46 pm
by santanu@citytech
I have installed in OC 3.9 version And I used this shortcode
Code: Select all
[module_product type="latest" limit="100" img_w="350" img_h="350" /]
in description on information page but no product display in frontend this code is display as normal text.
PFA the screenshot.
Screenshot 2024-07-15 171411.png (15.97 KiB) Viewed 3332 times
So how can I solve this issue? Please help me to solve this issue.
Thank you.
Re: OpenCart Shortcodes
Posted: Tue Jul 16, 2024 3:50 pm
by santanu@citytech
I have installed this module in OC 3.9 version and added shortcode
Code: Select all
[module_product type="latest" limit="100" img_w="350" img_h="350" /]
in description for information page but this code display as normal text on frontend.
Please help me to solve this issue.
Re: OpenCart Shortcodes
Posted: Tue Jul 16, 2024 9:31 pm
by JNeuhoff
This is about a 3rd party extension, so if you want help you should contact the author.