Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Adding images to packing options

    www.nyvinhus.dk, ZC version 1.5.4. PHP: 5.6.30

    Hi guys,

    Can somebody give me an simple example of code how to add images to each packing option that I have on my shop, so customers can choose easily between them?



    Here is the code that I have for the packing module:


    Code:
    "<?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=checkout_shipping.<br />
     * Displays allowed shipping modules for selection by customer.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2009 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_checkout_shipping_package.php 14807 2009-11-13 17:22:47Z drbyte $
     */
    
    ?>
    
    <div class="centerColumn" id="checkoutShipping">
    <?php echo zen_draw_form('checkout_address', zen_href_link('checkout_package', '', 'SSL')) . zen_draw_hidden_field('action', 'process'); ?>
    
    <h1 id="checkoutShippingHeading"><?php echo HEADING_TITLE; ?></h1>
    <?php if ($messageStack->size('checkout_package') > 0) echo $messageStack->output('checkout_package'); ?>
    
    <h2 id="checkoutShippingHeadingAddress"><?php echo TITLE_SHIPPING_ADDRESS; ?></h2>
    
    <div id="checkoutShipto" class="floatingBox">
    <?php if ($displayAddressEdit) { ?>
    <div class="buttonRow forward"><?php echo '<a href="' . $editShippingButtonLink . '">' . zen_image_button(BUTTON_IMAGE_CHANGE_ADDRESS, BUTTON_CHANGE_ADDRESS_ALT) . '</a>'; ?></div>
    <?php } ?>
    <address class=""><?php echo zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />'); ?></address>
    </div>
    <div class="floatingBox important"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION; ?></div>
    <br class="clearBoth" />
    
    <?php
      if (zen_count_shipping_modules() > 0) {
    ?>
    
    <h2 id="checkoutShippingHeadingMethod"><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></h2>
    
    <?php
        if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
    ?>
    
    <div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></div>
    
    <?php
        } elseif ($free_shipping == false) {
    ?>
    <div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></div>
    
    <?php
        }
    ?>
    <?php
        if ($free_shipping == true) {} else {
          $radio_buttons = 0;
    	  $shipping=$_SESSION['shipping']['id'];
    	  if($shipping == ''){
    		  header('location:/index.php?main_page=checkout_shipping');
    	  }
          for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
    
    		//------------ ADDITIONAL SCRIPT FOR CUSTOM SHIPPING --------------+
    		//echo $i;
    		if(is_array($quotes[$i]) && $quotes[$i]['module'] == ''){
    			//echo '+++';
    			//print_r($quotes[$i]);
    			
    			foreach($quotes[$i] as $eNode){
    				//echo $eNode['module'];
    				$finalModName=$eNode['module'].'_'.$eNode['module'];
    				if($finalModName == $shipping){
    					
    					
    				?>
                   <fieldset>
    				<legend>Vælg valgmulighed</legend>
    				<?php foreach($eNode['methods'] as $eachPackingOption){
    						$v=rand(100,999);
    					?>
                        <div>
                    <div class="important forward price"><?php echo $currencies->format($eachPackingOption['cost']); ?></div>
    				<?php echo zen_draw_radio_field('packing', $eachPackingOption['id'] , $checked, 'id="ship-'.$eNode['id'] .'-'.$v. '"'); ?>
    <label for="ship-<?php echo $eNode['id'].'-'.$v ; ?>" class="checkboxLabel" ><?php echo $eachPackingOption['title']; ?></label>
    <div class="clearBoth"></div>
    </div>
    
                    <?php $radio_buttons++;}?>
    			  </fieldset> 
                    <?php
    				}
    			}
    		}
    		
    		//------------ ADDITIONAL SCRIPT FOR CUSTOM SHIPPING --------------+
          }
        }
    ?>
    
    <?php
      } else {
    ?>
    <h2 id="checkoutShippingHeadingMethod"><?php echo TITLE_NO_SHIPPING_AVAILABLE; ?></h2>
    <div id="checkoutShippingContentChoose" class="important"><?php echo TEXT_NO_SHIPPING_AVAILABLE; ?></div>
    <?php
      }
    ?>
    
    
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONTINUE_CHECKOUT, BUTTON_CONTINUE_ALT); ?></div>
    <div class="buttonRow back"><?php echo '<strong>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</strong><br />' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></div>
    
    </form>
    </div>"
    Attached Images Attached Images  

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Adding images to packing options

    Many shipping modules include
    PHP Code:
    $this->icon ''
    in the module file in includes/modules/shipping/your_shipping_module.php

    Enter the patht to the image between the quotes

  3. #3
    Join Date
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Re: Adding images to packing options

    Thank you Design75,

    My problem is that this is an additional module, which has been created just to give options to customer to choose what packing they want. And I really don't see where to add this path for each packing option.

  4. #4
    Join Date
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Re: Adding images to packing options

    Quote Originally Posted by Design75 View Post
    Many shipping modules include
    PHP Code:
    $this->icon ''
    in the module file in includes/modules/shipping/your_shipping_module.php

    Enter the patht to the image between the quotes

    I think this is the code that you are talking about, but I am afraid that even when I add the code that mentioned isn't work. Any suggestions?


    Code:
    <?php
    
    /**
    
     * @package ShipPack
    
     * @copyright Copyright 2003-2017 phpism
    
     * @copyright Portions Copyright 2003 osCommerce
    
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    
     */
    
    class shippack extends base 
    
    {
    
        var $code, $title, $description, $enabled, $num_zones;
    
    
    
    // class constructor
    
        function __construct() 
    
        {
    
            global $db, $order;
    
            
    
            $this->num_zones = 3;
    
            
    
            $this->code = 'shippack';
    
            $this->title = MODULE_SHIPPING_SHIPPACK_TEXT_TITLE;
    
            $this->description = MODULE_SHIPPING_SHIPPACK_TEXT_DESCRIPTION;
    
    		$this->sort_order = MODULE_SHIPPING_SHIPPACK_SORT_ORDER;
    
    		$this->icon = ''; 
    
    		$this->tax_class = MODULE_SHIPPING_SHIPPACK_TAX_CLASS;
    
    		$this->tax_basis = MODULE_SHIPPING_SHIPPACK_TAX_BASIS;
    
    		$this->enabled = ((MODULE_SHIPPING_SHIPPACK_STATUS == 'True') ? true : false);
    
    		
    
            
    
        }
    
    	
    
    	function check() {
    
    		global $db;
    
    		if (!isset($this->_check)) {
    
    		  $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SHIPPACK_STATUS'");
    
    		  $this->_check = $check_query->RecordCount();
    
    		}
    
    		return $this->_check;
    
    	}
    
    	function quote(){
    
    		
    
    	}
    
    	function install() {
    
        	global $db;
    
    	
    
    		//----------SET 1------------+
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 1', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT1', '', 'UI Text<br>Examples:<br>Bag for 2 bottles ', '6', '2', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 1', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY1', '', 'UI Number of Bottle Available<br>Examples:<br>2 ', '6', '3', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 1', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE1', '', 'UI Price Per Packing<br>Examples:<br>0.50 EURO', '6', '4', now())");
    
    		
    
    		//----------SET 2------------+
    
    			
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 2', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT2', '', '', '6', '5', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 2', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY2', '', '', '6', '6', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 2', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE2', '', '', '6', '7', now())");
    
    		
    
    		//----------SET 3------------+
    
    		
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 3', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT3', '', '', '6', '8', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 3', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY3', '', '', '6', '9', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 3', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE3', '', '', '6', '10', now())");
    
    		
    
    		//----------SET 4------------+
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 4', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT4', '', '', '6', '11', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 4', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY4', '', '', '6', '12', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 4', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE4', '', '', '6', '13', now())");
    
    		
    
    		//----------SET 5------------+
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 5', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT5', '', '', '6', '14', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 5', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY5', '', '', '6', '15', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 5', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE5', '', '', '6', '16', now())");
    
    		
    
    		//----------SET 6------------+
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 6', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT6', '', '', '6', '17', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 6', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY6', '', '', '6', '18', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 6', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE6', '', '', '6', '19', now())");
    
    		
    
    		//----------SET 7------------+
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 7', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT7', '', '', '6', '20', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 7', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY7', '', '', '6', '21', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 7', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE7', '', '', '6', '22', now())");
    
    		
    
    		//----------SET 8------------+
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 8', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT8', '', '', '6', '23', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 8', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY8', '', '', '24', '15', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 8', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE8', '', '', '6', '25', now())");
    
    		
    
    		//----------OTHERS------------+
    
    		
    
    	
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Ship and Packing Module', 'MODULE_SHIPPING_SHIPPACK_STATUS', 'True', 'Calulate price according to zones and order quantity', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_SHIPPACK_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '98', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tax Basis', 'MODULE_SHIPPING_SHIPPACK_TAX_BASIS', 'Shipping', '', '6', '99', now())");
    
    		
    
    		$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_SHIPPACK_SORT_ORDER', '333', 'Sort order of display.', '6', '100', now())");
    
    		
    
    		
    
    	
    
      }
    
    
    
    	
    
      	function remove() {
    
       	    global $db;
    
        	$db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE\_SHIPPING\_SHIPPACK\_%'");
    
     	}
    
    
    
      	function keys() {
    
        	return array('MODULE_SHIPPING_SHIPPACK_SORT_ORDER', 'MODULE_SHIPPING_SHIPPACK_TAX_CLASS', 'MODULE_SHIPPING_SHIPPACK_TAX_BASIS', 'MODULE_SHIPPING_SHIPPACK_STATUS','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT1','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY1','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE1','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT2','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY2','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE2','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT3','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY3','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE3','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT4','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY4','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE4','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT5','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY5','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE5','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT6','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY6','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE6','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT7','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY7','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE7','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT8','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY8','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE8');
    
     	 }
    
    
    
    }

  5. #5
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Adding images to packing options

    In the code you pasted, there you can see
    PHP Code:
    $this->icon ''
    Quote Originally Posted by bennito View Post
    I think this is the code that you are talking about, but I am afraid that even when I add the code that mentioned isn't work. Any suggestions?


    Code:
    <?php
    
    /**
    
     * @package ShipPack
    
     * @copyright Copyright 2003-2017 phpism
    
     * @copyright Portions Copyright 2003 osCommerce
    
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    
     */
    
    class shippack extends base 
    
    {
    
        var $code, $title, $description, $enabled, $num_zones;
    
    
    
    // class constructor
    
        function __construct() 
    
        {
    
            global $db, $order;
    
            
    
            $this->num_zones = 3;
    
            
    
            $this->code = 'shippack';
    
            $this->title = MODULE_SHIPPING_SHIPPACK_TEXT_TITLE;
    
            $this->description = MODULE_SHIPPING_SHIPPACK_TEXT_DESCRIPTION;
    
            $this->sort_order = MODULE_SHIPPING_SHIPPACK_SORT_ORDER;
    
            $this->icon = ''; 
    
            $this->tax_class = MODULE_SHIPPING_SHIPPACK_TAX_CLASS;
    
            $this->tax_basis = MODULE_SHIPPING_SHIPPACK_TAX_BASIS;
    
            $this->enabled = ((MODULE_SHIPPING_SHIPPACK_STATUS == 'True') ? true : false);
    
            
    
            
    
        }
    
        
    
        function check() {
    
            global $db;
    
            if (!isset($this->_check)) {
    
              $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_SHIPPACK_STATUS'");
    
              $this->_check = $check_query->RecordCount();
    
            }
    
            return $this->_check;
    
        }
    
        function quote(){
    
            
    
        }
    
        function install() {
    
            global $db;
    
        
    
            //----------SET 1------------+
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 1', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT1', '', 'UI Text<br>Examples:<br>Bag for 2 bottles ', '6', '2', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 1', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY1', '', 'UI Number of Bottle Available<br>Examples:<br>2 ', '6', '3', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 1', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE1', '', 'UI Price Per Packing<br>Examples:<br>0.50 EURO', '6', '4', now())");
    
            
    
            //----------SET 2------------+
    
                
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 2', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT2', '', '', '6', '5', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 2', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY2', '', '', '6', '6', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 2', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE2', '', '', '6', '7', now())");
    
            
    
            //----------SET 3------------+
    
            
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 3', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT3', '', '', '6', '8', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 3', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY3', '', '', '6', '9', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 3', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE3', '', '', '6', '10', now())");
    
            
    
            //----------SET 4------------+
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 4', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT4', '', '', '6', '11', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 4', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY4', '', '', '6', '12', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 4', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE4', '', '', '6', '13', now())");
    
            
    
            //----------SET 5------------+
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 5', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT5', '', '', '6', '14', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 5', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY5', '', '', '6', '15', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 5', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE5', '', '', '6', '16', now())");
    
            
    
            //----------SET 6------------+
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 6', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT6', '', '', '6', '17', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 6', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY6', '', '', '6', '18', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 6', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE6', '', '', '6', '19', now())");
    
            
    
            //----------SET 7------------+
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 7', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT7', '', '', '6', '20', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 7', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY7', '', '', '6', '21', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 7', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE7', '', '', '6', '22', now())");
    
            
    
            //----------SET 8------------+
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Text 8', 'MODULE_SHIPPING_SHIPPACK_PACKINGTEXT8', '', '', '6', '23', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Quantity 8', 'MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY8', '', '', '24', '15', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Packing Option Price 8', 'MODULE_SHIPPING_SHIPPACK_PACKINGPRICE8', '', '', '6', '25', now())");
    
            
    
            //----------OTHERS------------+
    
            
    
        
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Ship and Packing Module', 'MODULE_SHIPPING_SHIPPACK_STATUS', 'True', 'Calulate price according to zones and order quantity', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_SHIPPACK_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '98', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tax Basis', 'MODULE_SHIPPING_SHIPPACK_TAX_BASIS', 'Shipping', '', '6', '99', now())");
    
            
    
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_SHIPPACK_SORT_ORDER', '333', 'Sort order of display.', '6', '100', now())");
    
            
    
            
    
        
    
      }
    
    
    
        
    
          function remove() {
    
               global $db;
    
            $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE\_SHIPPING\_SHIPPACK\_%'");
    
         }
    
    
    
          function keys() {
    
            return array('MODULE_SHIPPING_SHIPPACK_SORT_ORDER', 'MODULE_SHIPPING_SHIPPACK_TAX_CLASS', 'MODULE_SHIPPING_SHIPPACK_TAX_BASIS', 'MODULE_SHIPPING_SHIPPACK_STATUS','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT1','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY1','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE1','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT2','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY2','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE2','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT3','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY3','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE3','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT4','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY4','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE4','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT5','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY5','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE5','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT6','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY6','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE6','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT7','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY7','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE7','MODULE_SHIPPING_SHIPPACK_PACKINGTEXT8','MODULE_SHIPPING_SHIPPACK_PACKINGQUANTITY8','MODULE_SHIPPING_SHIPPACK_PACKINGPRICE8');
    
          }
    
    
    
    }

  6. #6
    Join Date
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Re: Adding images to packing options

    yes, I see the code... but

    1. I need for each set of packing a different image.
    2. Even if I add the path of the image there they are not shown in the page.

  7. #7
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Adding images to packing options

    Sorry, I missed that. I'll go back into my corner then, and take a closer look at your code to see if I can help.

  8. #8
    Join Date
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Re: Adding images to packing options

    Thank you very much for your effort!

  9. #9
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Adding images to packing options

    Can you edit the descriptions in the admin? If so, you could add the image path in there

  10. #10
    Join Date
    Jan 2016
    Location
    Denmark, Copenhagen
    Posts
    39
    Plugin Contributions
    0

    Default Re: Adding images to packing options

    Yes, I can add different names for each packing. But I am not sure what is the right code.

    Click image for larger version. 

Name:	2018-12-20_01353.jpg 
Views:	22 
Size:	59.2 KB 
ID:	18203

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 Problem Adding Data to Packing Slip
    By dbltoe in forum Customization from the Admin
    Replies: 2
    Last Post: 8 Aug 2016, 11:04 PM
  2. Replies: 3
    Last Post: 17 Jun 2012, 07:21 PM
  3. Adding a line of text to packing slip
    By Big_Woody in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 31 Oct 2007, 10:16 PM
  4. Adding my comments to a packing slip?
    By HandcraftedUK in forum Managing Customers and Orders
    Replies: 4
    Last Post: 2 May 2007, 09:30 AM
  5. Packing Slip - Adding Manufacturer
    By Pip in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Dec 2006, 03:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR