Xin chào, các bạn có thể giúp mình vấn đề này không? Mình đang sử dụng joomla 2.5 và virtuemart 2.06, template gkyourshop. Vấn đề bây giờ mình muốn là ngoài phần hiễn thị sản phẫm có 3 hoặc 4 tab ( như là tổng quan, tính năng...) mình được biết có rất nhiều plugin làm được việc này như DJ preakpage, magic tab..., nhưng để thêm 1 tab thì mình phải add tab trong phần soạn thảo mô tả sản phẫm của virtuemart. Vậy có extension nào cho phép tạo ra nhiều vùng soạn thảo, trong phần product description trong virtuemart được không? xin cám ơn.
Trường hợp bác hỏi giống em. Bác nào làm được add sky em có trả công. Nhớ giá cả phù hợp để em còn học tập
Sau khi nghiên cứu nhiều ngày mình cũng đã có đôi chút về VM 2.0 Trước tiên muốn dễ dàng ta nên đưa short descripton và fields về về dạng WYSIWYG. Vào đường dẫn: administrator/components/com_virtuemart/views/product/tmpl/product_edit_custom.php Chọn: PHP: jQuery(document).ready(function(){ jQuery('#custom_field').sortable(); // Need to declare the update routine outside the sortable() function so // that it can be called when adding new customfields jQuery('#custom_field').bind('sortupdate', function(event, ui) { jQuery(this).find('.ordering').each(function(index,element) { jQuery(element).val(index); //console.log(index+' '); }); }); }); Thay bằng PHP: // BEGIN CORE HACK - Refresh sortable UI with tinyMCE jQuery(document).ready(function(){ jQuery('#custom_field').sortable({ start: function(e, ui){ jQuery(this).find('.removable textarea').each(function(){ tinyMCE.execCommand('mceRemoveControl', false, jQuery(this).attr('id')); }); }, stop: function(e,ui) { jQuery(this).find('.removable textarea').each(function(){ tinyMCE.execCommand( 'mceAddControl', false, jQuery(this).attr('id') ); jQuery(this).sortable('refresh'); }); } }); }); Còn về chèn tab đễ mình làm 1 tút hướng dẫn các bạn sau
Còn dưới đây là hướng dẫn dạng trù phú cho mô tả ngắn. Bạn vào: administrator/com_virtuemart/views/product/tmpl/product_edit_description.php Thay thế toàn bộ bằng code sau ( vậy cho dễ khỏi tìm) PHP: <?php/**** Set the descriptions for a product** @package VirtueMart* @subpackage Product* @author RolandD* @link http://www.virtuemart.net* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php* VirtueMart is free software. This version may have been modified pursuant* to the GNU General Public License, and as distributed it includes or* is derivative of works licensed under the GNU General Public License or* other free or open source software licenses.* @version $Id: product_edit_description.php 6046 2012-05-24 12:43:43Z alatak $*/// Check to ensure this file is included in Joomla!defined('_JEXEC') or die('Restricted access');?><fieldset> <legend><?php echo JText::_('COM_VIRTUEMART_PRODUCT_FORM_S_DESC') ?></legend> <?php echo $this->editor->display('product_s_desc', $this->product->product_s_desc, '100%;', '450', '75', '20', array('pagebreak', 'readmore') ) ; ?></fieldset> <fieldset> <legend><?php echo JText::_('COM_VIRTUEMART_PRODUCT_FORM_DESCRIPTION') ?></legend> <?php echo $this->editor->display('product_desc', $this->product->product_desc, '100%;', '450', '75', '20', array('pagebreak', 'readmore') ) ; ?></fieldset><fieldset> <legend><?php echo JText::_('COM_VIRTUEMART_METAINFO') ?></legend> <?php echo shopFunctions::renderMetaEdit($this->product); ?></fieldset> Tiếp đên vô Database Đổi cái type của producs_s_des từ nvarchar ----> text. Hình mình họa cho sinh động Trình độ có hạn nên chỉ có vậy Còn phần add tabs cố định mình sẽ làm tut sau