Add nhiều tab cố định vào phần mô tả sản phẫm virtuemart 2.x

Thảo luận trong 'VirtueMart' bắt đầu bởi Gravia, 1/10/14.

  1. Gravia

    Gravia Mới tham gia

    Bài viết:
    2
    Likes :
    0
    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.
     
  2. duchaidlu2009

    duchaidlu2009 Rất tích cực

    Bài viết:
    56
    Likes :
    8
    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
     
  3. duchaidlu2009

    duchaidlu2009 Rất tích cực

    Bài viết:
    56
    Likes :
    8
    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(eventui) {
                
    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(eui){
                
    jQuery(this).find('.removable textarea').each(function(){
                    
    tinyMCE.execCommand('mceRemoveControl'falsejQuery(this).attr('id'));
                });
                },
                
    stop: function(e,ui) {
                    
    jQuery(this).find('.removable textarea').each(function(){
                        
    tinyMCE.execCommand'mceAddControl'falsejQuery(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

     
  4. duchaidlu2009

    duchaidlu2009 Rất tích cực

    Bài viết:
    56
    Likes :
    8
    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
    [​IMG]
    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
     
    quyenvt thích bài này.
  5. quyenvt

    quyenvt Mới tham gia

    Bài viết:
    7
    Likes :
    0
     
  6. quyenvt

    quyenvt Mới tham gia

    Bài viết:
    7
    Likes :
    0
    Thanks bạn đã chia sẻ đợi tut add tabs của bạn*Happy*
     
comments powered by Disqus

Chia sẻ trang này