Zen Cart Logo
Forums / All Other Contributions/Addons / Group Pricing Per Item Issue

Group Pricing Per Item Issue

Views: 60,111

Results 21 to 40 of 136
30 Jun 2007, 4:58 AM
#21
vivaraquel avatar

vivaraquel

Zen Follower

Join Date:
Sep 2004
Location:
Australia
Posts:
305
Plugin Contributions:
0

Group Pricing Per Item Issue

HappyMom:

ZEN cart version: 1.3.7

To answer your question, vivaraquel, the file in the download area has not been updated. I just try it today [June 23, 2007] and I run into this problem. To be honest, I fiddle alot with the installation process, but I think this is the right order:

Install the group pricing patch.

Install the online group pricing patch. [The prices in the shopping cart are really messed up with this]

Then install/copy codeMonger's shopping_cart.php file in the right location (includes/classes)

This is what worked for me. Hopefully it will work for you too.

Thanks!

Thanks for taking the time to answer my question. I think I'll wait a bit longer b4 I install this. Good luck to everyone.

6 Jul 2007, 8:58 PM
#22
lyricwings avatar

lyricwings

Zen Follower

Join Date:
Oct 2006
Posts:
109
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I think my problem is a different one from any listed here, so I'm wondering if anyone else has had this problem.

My discount prices with this mod work fine. However, what isn't working is that for anyone assigned to a group (I just have one group assigned right now - Group A), the Specials I've set are not working properly.

The Specials are not products that are affected by group pricing - they are separate products.

For those customers in Group A, the correct price shows up until they go to check out, at which point the price reverts back to the original price, rather than the sale price.

Any ideas?

~LW

8 Jul 2007, 8:42 AM
#23
gruntre69 avatar

gruntre69

Zen Follower

Join Date:
Aug 2005
Location:
Australia
Posts:
103
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Hi all,

I really like this contrib as I have dealers for only the products we manufacture. The discount showing negative is not a real problem because special pricing is often not applicable to pricing groups and the code is telling the truth.

If the special price is below the group price then a positive discount is shown. Besides specials seem to be ignored at the shopping cart when a per item group price is set and the group customer is logged in. This is perfect.

The problem I have which if fixed would allow me to use the contrib is this:

When there are quantity discounts set the qty prices are ignored and only the per item group price is used for the shopping cart and checkout. It actually shows the qty pricing table on the product listing page and correctly show the new qty prices discounted from the group item price but it doesn't follow through and use these prices.

It would be perfect if this contrib was integrated into the product price manager and had a separate qty table for no group (guests) and each group. That would be a perfect world...

Can anybody help with a fix for this? I am not able to write PHP code myself...

8 Jul 2007, 12:46 PM
#24
gruntre69 avatar

gruntre69

Zen Follower

Join Date:
Aug 2005
Location:
Australia
Posts:
103
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I have found another floor in this contrib, it seems that it causes any member of any pricing group to be disabled from receiving any quatity discounts even if it is not one of the 4 predefined per item groups.

Seems like this contrib needs a fair bit more work. It is a great idea though and would be good if it was finished.

9 Jul 2007, 6:18 PM
#25
lyricwings avatar

lyricwings

Zen Follower

Join Date:
Oct 2006
Posts:
109
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

<I have found another floor in this contrib, it seems that it causes any member of any pricing group to be disabled from receiving any quatity discounts even if it is not one of the 4 predefined per item groups.>

I have found this, too (as posted above).

So I just went in to the products and assigned the special price to that Group, so that they would automatically get it. That seems to be working just fine.

16 Nov 2007, 12:57 AM
#26
modchipfitters_co_uk avatar

modchipfitters_co_uk

Zen Follower

Join Date:
Sep 2006
Location:
United Kingdom
Posts:
190
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

can anyone help i have installed group_pricing_per_item_1.2.1a on to a zen 1.3.7 installation
the problem i have is all discounts are working when the customer reaches the checkout but group d a group c wont display the correct prices when browsing products yet groups a & b work fine

for example if a customer is assigned to group a or b and the default price is 9.99 and group a price is 8.99 then the customer for group a will see 8.99 both on the product listing and in the shopping cart and in the checkout ok all works great so far
but if i assign the same customer to group c or d they it wont display the correct price on the product listing. to clarify if groups c's price for the 9.99 item is 7.99 they will see 9.99 when viewing the product listing but once in the cart or checkout it shows the correct amount of 7.99

are you all totally confused now??? i know i am!! lol
anyone got any idea's????

23 Nov 2007, 10:24 PM
#27
pastelblack avatar

pastelblack

New Zenner

Join Date:
Nov 2007
Posts:
22
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

perelandra:

thank you codeMonger! No luck needed, that did the trick... very kind of you to upload that!... only now come to find out GPPI doesn't play at all nice with "special pricing" or "salemaker". Really wacked... e.g. displays:

$196.60 $233.46
Save: -19% off

where $196.60 is the group price (strike through in zen cart) and $233.46 (in red) is the "special" price. Calculates a minus percentage! The right price shows up correctly in the shopping cart but this looks really wacky on the products display. It looks like the code in shopping_cart.php is supposed to turn off the special_price when group_price (// exclude group price) is active, but doesn't look like it's working, or I'm not reading it correctly.

Has anyone been able to get this working? I tried the suggestions made in the thread, but I still get the negative % off as described above.

24 Nov 2007, 3:01 AM
#28
modchipfitters_co_uk avatar

modchipfitters_co_uk

Zen Follower

Join Date:
Sep 2006
Location:
United Kingdom
Posts:
190
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

well i still cant understand why the first 2 groups work fine but second 2 groups wont display the correct price
spent hours on the forum and looking at code and none of it has helped

please can anyone shed some light on my above post pretty please :D ill even throw in a cherry lol

11 Dec 2007, 3:51 PM
#29
lbooth avatar

lbooth

New Zenner

Join Date:
Oct 2007
Posts:
25
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

The problem with the second two groups C & D is due to a problem on line 137 & 139 the field is referenced as zen_ this needs to be removed as in Group A & B. I also spent hours looking for a solution and just noticed this by chance. :lookaroun

11 Dec 2007, 11:06 PM
#30
pastelblack avatar

pastelblack

New Zenner

Join Date:
Nov 2007
Posts:
22
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Line 137 and 139 of which file?

16 Dec 2007, 5:15 AM
#31
happymom avatar

happymom

New Zenner

Join Date:
May 2006
Posts:
82
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I still see the problem on my store, but at least when the customer goes to check out, they get the "group" price, which is 0.00

16 Dec 2007, 11:44 AM
#32
garyos avatar

garyos

New Zenner

Join Date:
Jan 2005
Location:
Ireland
Posts:
7
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I believe that the error is in:

Line 137 & 138 in \catalog\includes\functions\functions_prices.php

Change ['zen_products_group_c_price'] to ['products_group_c_price']
&
['zen_products_group_d_price'] to ['products_group_d_price']

Hope this helps....


File should now look like:

    if($customers_group == "Group A" && $product_check->fields['products_group_a_price'] != 0) {
      $products_price = $product_check->fields['products_group_a_price'];
    } elseif($customers_group == "Group B" && $product_check->fields['products_group_b_price'] != 0) {
      $products_price = $product_check->fields['products_group_b_price'];
    } elseif($customers_group == "Group C" && $product_check->fields['products_group_c_price'] != 0) {
      $products_price = $product_check->fields['products_group_c_price'];
    } elseif($customers_group == "Group D" && $product_check->fields['products_group_d_price'] != 0) {
      $products_price = $product_check->fields['products_group_d_price'];
2 Feb 2008, 4:55 PM
#33
zackf avatar

zackf

New Zenner

Join Date:
Mar 2007
Posts:
63
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I'm using v1.38a and for some reason I can't seem to get the mod working. I got the mod working where it carries through the pricing from item to shopping cart however the only thing that isn't working is that the amount total (amount: ) is showing the non-group pricing.

Any help is great appreciated!! :)

Thanks - Zack

4 Feb 2008, 10:14 AM
#34
modchipfitters_co_uk avatar

modchipfitters_co_uk

Zen Follower

Join Date:
Sep 2006
Location:
United Kingdom
Posts:
190
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

zackf:

I'm using v1.38a and for some reason I can't seem to get the mod working. I got the mod working where it carries through the pricing from item to shopping cart however the only thing that isn't working is that the amount total (amount: ) is showing the non-group pricing.

Any help is great appreciated!! :)

Thanks - Zack

i have exactly the same problem
eveything works fine in this mod except the total price in the cart yet once the order is complete it does show the correct total price

6 Feb 2008, 1:02 PM
#35
dml311071 avatar

dml311071

New Zenner

Join Date:
Sep 2006
Location:
Grimsby UK
Posts:
98
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Hi

I don't seem to be having the problem that you guys are having but I wondered if anyone here had managed to populate the extra group prices using Easy Populate? If so where do I add the fields and what are their names?

I'm sure then that I will hit the same problems as you guys! logically, the call to shopping cart price display probably needs an input from the group price per item mod so that the correct variable is displayed but I don't know enough of the code flow to back engineer the variables.

IMHO this would be legacy core code so you may require someone of ZC experience. It may need one of the dev team.

Regards

Dave

14 Feb 2008, 4:18 PM
#36
dml311071 avatar

dml311071

New Zenner

Join Date:
Sep 2006
Location:
Grimsby UK
Posts:
98
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

I fixed the original problem of populating the price group fields using phpmyadmin. I am now stuck with a cart that shows the correct price per item in the store, but the shopping cart displays the default price as a total.
This is a real problem, I am certain that one of the dev team could fix it.

I'll give them a try.

I am running ZC 1.3.8a and none of codemonger's hard work yielded a result unfortunately.

Hope this mod gets sorted, it's really useful.

Regards

Dave

21 Feb 2008, 5:28 AM
#37
silkenstrand avatar

silkenstrand

New Zenner

Join Date:
Jul 2005
Posts:
29
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

auzzie:

Just wondering if anyone has experienced this issue.

When adding or updating a product the Group prices are not saving to the database.

EG: I enter the normal price, plus the prices for each group ie. Group A, Group B etc...

Save the updates. When I go back to edit the product again only the Normal price is showing none of the Group Prices have updated.

I am using Zen Cart version 1.3.7.

This is the problem, and unlike for auzzie reloading the module didn't help. This is the first change I've made to this storefront, so I know that no other modules are interfering with it.

Interestingly enough, when I did the changes from "yourprefix" over to my database prefix collect_info.php didn't make any changes. I've reviewed it over and over again trying to locate where the changes might need to be made, but I am not a php expert. Perhaps the problem is there? (see below)

21 Feb 2008, 5:29 AM
#38
silkenstrand avatar

silkenstrand

New Zenner

Join Date:
Jul 2005
Posts:
29
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

<?php
if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}
    $parameters = array('products_name' => '',
                       'products_description' => '',
                       'products_url' => '',
                       'products_id' => '',
                       'products_quantity' => '',
                       'products_model' => '',
                       'products_image' => '',
                       'products_price' => '',
					    'products_group_a_price' => '',
                      'products_group_b_price' => '',
                       'products_group_c_price' => '',
                       'products_group_d_price' => '',
                       'products_virtual' => DEFAULT_PRODUCT_PRODUCTS_VIRTUAL,
                       'products_weight' => '',
                       'products_date_added' => '',
                       'products_last_modified' => '',
                       'products_date_available' => '',
                       'products_status' => '',
                       'products_tax_class_id' => DEFAULT_PRODUCT_TAX_CLASS_ID,
                       'manufacturers_id' => '',
                       'products_quantity_order_min' => '',
                       'products_quantity_order_units' => '',
                       'products_priced_by_attribute' => '',
                       'product_is_free' => '',
                       'product_is_call' => '',
                       'products_quantity_mixed' => '',
                       'product_is_always_free_shipping' => DEFAULT_PRODUCT_PRODUCTS_IS_ALWAYS_FREE_SHIPPING,
                       'products_qty_box_status' => PRODUCTS_QTY_BOX_STATUS,
                       'products_quantity_order_max' => '0',
                       'products_sort_order' => '0',
                       'products_discount_type' => '0',
                       'products_discount_type_from' => '0',
                       'products_price_sorter' => '0',
                       'master_categories_id' => ''
                       );

    $pInfo = new objectInfo($parameters);

    if (isset($_GET['pID']) && empty($_POST)) {
      $product = $db->Execute("select pd.products_name, pd.products_description, pd.products_url,
                                      p.products_id, p.products_quantity, p.products_model,
                                      p.products_image, p.products_price, p.products_virtual, p.products_weight,
								 p.products_group_a_price, p.products_group_b_price, 
                                 p.products_group_c_price, p.products_group_d_price,
                                      p.products_date_added, p.products_last_modified,
                                      date_format(p.products_date_available, '%Y-%m-%d') as
                                      products_date_available, p.products_status, p.products_tax_class_id,
                                      p.manufacturers_id,
                                      p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
                                      p.product_is_free, p.product_is_call, p.products_quantity_mixed,
                                      p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max,
                                      p.products_sort_order,
                                      p.products_discount_type, p.products_discount_type_from,
                                      p.products_price_sorter, p.master_categories_id
                              from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                              where p.products_id = '" . (int)$_GET['pID'] . "'
                              and p.products_id = pd.products_id
                              and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");

      $pInfo->objectInfo($product->fields);
    } elseif (zen_not_null($_POST)) {
      $pInfo->objectInfo($_POST);
      $products_name = $_POST['products_name'];
      $products_description = $_POST['products_description'];
      $products_url = $_POST['products_url'];
    }
 $group_pricing = $db->Execute("select group_name from " . TABLE_GROUP_PRICING . " group_pricing");
    while (!$group_pricing->EOF) {
      $group_pricing_array[] = $group_pricing->fields['group_name'];
      $group_pricing->MoveNext();
    }
    $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));
    $manufacturers = $db->Execute("select manufacturers_id, manufacturers_name
                                   from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
    while (!$manufacturers->EOF) {
      $manufacturers_array[] = array('id' => $manufacturers->fields['manufacturers_id'],
                                     'text' => $manufacturers->fields['manufacturers_name']);
      $manufacturers->MoveNext();
    }

    $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
    $tax_class = $db->Execute("select tax_class_id, tax_class_title
                                     from " . TABLE_TAX_CLASS . " order by tax_class_title");
    while (!$tax_class->EOF) {
      $tax_class_array[] = array('id' => $tax_class->fields['tax_class_id'],
                                 'text' => $tax_class->fields['tax_class_title']);
      $tax_class->MoveNext();
    }

    $languages = zen_get_languages();

    if (!isset($pInfo->products_status)) $pInfo->products_status = '1';
    switch ($pInfo->products_status) {
      case '0': $in_status = false; $out_status = true; break;
      case '1':
      default: $in_status = true; $out_status = false;
        break;
    }
// set to out of stock if categories_status is off and new product or existing products_status is off
    if (zen_get_categories_status($current_category_id) == '0' and $pInfo->products_status != '1') {
      $pInfo->products_status = 0;
      $in_status = false;
      $out_status = true;
    }

// Virtual Products
    if (!isset($pInfo->products_virtual)) $pInfo->products_virtual = PRODUCTS_VIRTUAL_DEFAULT;
    switch ($pInfo->products_virtual) {
      case '0': $is_virtual = false; $not_virtual = true; break;
      case '1': $is_virtual = true; $not_virtual = false; break;
      default: $is_virtual = false; $not_virtual = true;
    }
// Always Free Shipping
    if (!isset($pInfo->product_is_always_free_shipping)) $pInfo->product_is_always_free_shipping = DEFAULT_PRODUCT_PRODUCTS_IS_ALWAYS_FREE_SHIPPING;
    switch ($pInfo->product_is_always_free_shipping) {
      case '0': $is_product_is_always_free_shipping = false; $not_product_is_always_free_shipping = true; $special_product_is_always_free_shipping = false; break;
      case '1': $is_product_is_always_free_shipping = true; $not_product_is_always_free_shipping = false; $special_product_is_always_free_shipping = false; break;
      case '2': $is_product_is_always_free_shipping = false; $not_product_is_always_free_shipping = false; $special_product_is_always_free_shipping = true; break;
      default: $is_product_is_always_free_shipping = false; $not_product_is_always_free_shipping = true; $special_product_is_always_free_shipping = false;
    }
// products_qty_box_status shows
    if (!isset($pInfo->products_qty_box_status)) $pInfo->products_qty_box_status = PRODUCTS_QTY_BOX_STATUS;
    switch ($pInfo->products_qty_box_status) {
      case '0': $is_products_qty_box_status = false; $not_products_qty_box_status = true; break;
      case '1': $is_products_qty_box_status = true; $not_products_qty_box_status = false; break;
      default: $is_products_qty_box_status = true; $not_products_qty_box_status = false;
    }
// Product is Priced by Attributes
    if (!isset($pInfo->products_priced_by_attribute)) $pInfo->products_priced_by_attribute = '0';
    switch ($pInfo->products_priced_by_attribute) {
      case '0': $is_products_priced_by_attribute = false; $not_products_priced_by_attribute = true; break;
      case '1': $is_products_priced_by_attribute = true; $not_products_priced_by_attribute = false; break;
      default: $is_products_priced_by_attribute = false; $not_products_priced_by_attribute = true;
    }
// Product is Free
    if (!isset($pInfo->product_is_free)) $pInfo->product_is_free = '0';
    switch ($pInfo->product_is_free) {
      case '0': $in_product_is_free = false; $out_product_is_free = true; break;
      case '1': $in_product_is_free = true; $out_product_is_free = false; break;
      default: $in_product_is_free = false; $out_product_is_free = true;
    }
// Product is Call for price
    if (!isset($pInfo->product_is_call)) $pInfo->product_is_call = '0';
    switch ($pInfo->product_is_call) {
      case '0': $in_product_is_call = false; $out_product_is_call = true; break;
      case '1': $in_product_is_call = true; $out_product_is_call = false; break;
      default: $in_product_is_call = false; $out_product_is_call = true;
    }
// Products can be purchased with mixed attributes retail
    if (!isset($pInfo->products_quantity_mixed)) $pInfo->products_quantity_mixed = '0';
    switch ($pInfo->products_quantity_mixed) {
      case '0': $in_products_quantity_mixed = false; $out_products_quantity_mixed = true; break;
      case '1': $in_products_quantity_mixed = true; $out_products_quantity_mixed = false; break;
      default: $in_products_quantity_mixed = true; $out_products_quantity_mixed = false;
    }

// set image overwrite
  $on_overwrite = true;
  $off_overwrite = false;
// set image delete
  $on_image_delete = false;
  $off_image_delete = true;
?>
<link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">
<script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
<script language="javascript"><!--
  var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_product", "products_date_available","btnDate1","<?php echo $pInfo->products_date_available; ?>",scBTNMODE_CUSTOMBLUE);
//--></script>
<script language="javascript"><!--
var tax_rates = new Array();
<?php
    for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) {
      if ($tax_class_array[$i]['id'] > 0) {
        echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . zen_get_tax_rate_value($tax_class_array[$i]['id']) . ';' . "\n";
      }
    }
?>

function doRound(x, places) {
  return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
}

function getTaxRate() {
  var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;
  var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;

  if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
    return tax_rates[parameterVal];
  } else {
    return 0;
  }
}

function updateGross() {
  var taxRate = getTaxRate();

  updateGrossPrices("products_price", "products_price_gross", taxRate);

  <?
     foreach ($group_pricing_array as $group) {
       if ($group == "Group A") {
               ?>updateGrossPrices("products_group_a_price", "products_group_a_price_gross", taxRate);<?
       }
       if ($group == "Group B") {
               ?>updateGrossPrices("products_group_b_price", "products_group_b_price_gross", taxRate);<?
       }
       if ($group == "Group C") {
                ?>updateGrossPrices("products_group_c_price", "products_group_c_price_gross", taxRate);<?
       }
       if ($group == "Group D") {
                ?>updateGrossPrices("products_group_d_price", "products_group_d_price_gross", taxRate);<?
       }
     }
  ?>
}

function updateNet() {
  var taxRate = getTaxRate();

  updateNetPrices("products_price_gross", "products_price", taxRate);
  
    <?
      foreach ($group_pricing_array as $group) {
        if ($group == "Group A") {
               ?>updateNetPrices("products_group_a_price_gross", "products_group_a_price", taxRate);<?
        }
        if ($group == "Group B") {
               ?>updateNetPrices("products_group_b_price_gross", "products_group_b_price", taxRate);<?
        }
        if ($group == "Group C") {
               ?>updateNetPrices("products_group_c_price_gross", "products_group_c_price", taxRate);<?
        }
        if ($group == "Group D") {
               ?>updateNetPrices("products_group_d_price_gross", "products_group_d_price", taxRate);<?
        }
      }   
  ?>
}

function updateGrossPrices(field, field2, taxRate) {
	
   var grossValue = eval('document.forms["new_product"].' + field + '.value;');
   if (taxRate > 0) {
       grossValue = grossValue * ((taxRate / 100) + 1);
   }

   eval('document.forms["new_product"].' + field2 + '.value = doRound(grossValue, 4);');
}

function updateNetPrices(field, field2, taxRate) {

   var netValue = eval('document.forms["new_product"].' + field + '.value;');
    if (taxRate > 0) {
       netValue = netValue / ((taxRate / 100) + 1);
    }

    eval('document.forms["new_product"].' + field2 + '.value = doRound(netValue, 4);');
}

//--></script>
    <?php
//  echo $type_admin_handler;
echo zen_draw_form('new_product', $type_admin_handler , 'cPath=' . $cPath . (isset($_GET['product_type']) ? '&product_type=' . $_GET['product_type'] : '') . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=new_product_preview' . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'post', 'enctype="multipart/form-data"'); ?>

 
21 Feb 2008, 5:31 AM
#39
silkenstrand avatar

silkenstrand

New Zenner

Join Date:
Jul 2005
Posts:
29
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

Continued...

   <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php echo sprintf(TEXT_NEW_PRODUCT, zen_output_generated_category_path($current_category_id)); ?></td>
            <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td class="main" align="right"><?php echo zen_draw_hidden_field('products_date_added', (zen_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . zen_image_submit('button_preview.gif', IMAGE_PREVIEW) . '  <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
      </tr>
      <tr>
        <td><table border="0" cellspacing="0" cellpadding="2">
<?php
// show when product is linked
if (zen_get_product_is_linked($_GET['pID']) == 'true' and $_GET['pID'] > 0) {
?>
          <tr>
            <td class="main"><?php echo TEXT_MASTER_CATEGORIES_ID; ?></td>
            <td class="main">
              <?php
                // echo zen_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id);
                echo zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . '  ';
                echo zen_draw_pull_down_menu('master_category', zen_get_master_categories_pulldown($_GET['pID']), $pInfo->master_categories_id); ?>
            </td>
          </tr>
<?php } else { ?>
          <tr>
            <td class="main"><?php echo TEXT_MASTER_CATEGORIES_ID; ?></td>
            <td class="main"><?php echo TEXT_INFO_ID . ($_GET['pID'] > 0 ? $pInfo->master_categories_id  . ' ' . zen_get_category_name($pInfo->master_categories_id, $_SESSION['languages_id']) : $current_category_id  . ' ' . zen_get_category_name($current_category_id, $_SESSION['languages_id'])); ?>
          </tr>
<?php } ?>
          <tr>
            <td colspan="2" class="main"><?php echo TEXT_INFO_MASTER_CATEGORIES_ID; ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '100%', '2'); ?></td>
          </tr>
<?php
// hidden fields not changeable on products page
echo zen_draw_hidden_field('master_categories_id', $pInfo->master_categories_id);
echo zen_draw_hidden_field('products_discount_type', $pInfo->products_discount_type);
echo zen_draw_hidden_field('products_discount_type_from', $pInfo->products_discount_type_from);
echo zen_draw_hidden_field('products_price_sorter', $pInfo->products_price_sorter);
?>
          <tr>
            <td colspan="2" class="main" align="center"><?php echo (zen_get_categories_status($current_category_id) == '0' ? TEXT_CATEGORIES_STATUS_INFO_OFF : '') . ($out_status == true ? ' ' . TEXT_PRODUCTS_STATUS_INFO_OFF : ''); ?></td>
          <tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('products_status', '1', $in_status) . ' ' . TEXT_PRODUCT_AVAILABLE . ' ' . zen_draw_radio_field('products_status', '0', $out_status) . ' ' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br /><small>(YYYY-MM-DD)</small></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' '; ?><script language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
<?php
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
            <td class="main"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : zen_get_products_name($pInfo->products_id, $languages[$i]['id'])), zen_set_field_length(TABLE_PRODUCTS_DESCRIPTION, 'products_name')); ?></td>
          </tr>
<?php
    }
?>

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>

          <tr>
            <td class="main"><?php echo TEXT_PRODUCT_IS_FREE; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('product_is_free', '1', ($in_product_is_free==1)) . ' ' . TEXT_YES . '  ' . zen_draw_radio_field('product_is_free', '0', ($in_product_is_free==0)) . ' ' . TEXT_NO . ' ' . ($pInfo->product_is_free == 1 ? '<span class="errorText">' . TEXT_PRODUCTS_IS_FREE_EDIT . '</span>' : ''); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCT_IS_CALL; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('product_is_call', '1', ($in_product_is_call==1)) . ' ' . TEXT_YES . '  ' . zen_draw_radio_field('product_is_call', '0', ($in_product_is_call==0)) . ' ' . TEXT_NO . ' ' . ($pInfo->product_is_call == 1 ? '<span class="errorText">' . TEXT_PRODUCTS_IS_CALL_EDIT . '</span>' : ''); ?></td>
          </tr>

          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('products_priced_by_attribute', '1', $is_products_priced_by_attribute) . ' ' . TEXT_PRODUCT_IS_PRICED_BY_ATTRIBUTE . '  ' . zen_draw_radio_field('products_priced_by_attribute', '0', $not_products_priced_by_attribute) . ' ' . TEXT_PRODUCT_NOT_PRICED_BY_ATTRIBUTE . ' ' . ($pInfo->products_priced_by_attribute == 1 ? '<span class="errorText">' . TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES_EDIT . '</span>' : ''); ?></td>
          </tr>

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr bgcolor="#ebebff">
            <td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"'); ?></td>
          </tr>
          <tr bgcolor="#ebebff">
            <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td>
          </tr>
          <tr bgcolor="#ebebff">
            <td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
			
zen_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>
          </tr>
		  
		   <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
         <?
           foreach ($group_pricing_array as $group) {
              if ($group == "Group A") {
               ?>
                 <tr bgcolor="#ebebff">
                   <td class="main"><?php echo TEXT_PRODUCTS_GROUP_A_PRICE_NET; ?></td>
                   <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_a_price', $pInfo->products_group_a_price, 'onKeyUp="updateGross()"'); ?></td>
                 </tr>
                 <tr bgcolor="#ebebff">
                   <td class="main"><?php echo TEXT_PRODUCTS_GROUP_A_PRICE_GROSS; ?></td>
                   <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_a_price_gross', $pInfo->products_group_a_price, 'OnKeyUp="updateNet()"'); ?></td>
                 </tr>
                 <tr>
                   <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                 </tr>
               <?
              }
             if ($group == "Group B") {
                ?>
                 <tr bgcolor="#ebebff">
                   <td class="main"><?php echo TEXT_PRODUCTS_GROUP_B_PRICE_NET; ?></td>
                   <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_b_price', $pInfo->products_group_b_price, 'onKeyUp="updateGross()"'); ?></td>
                 </tr>
                  <tr bgcolor="#ebebff">
                   <td class="main"><?php echo TEXT_PRODUCTS_GROUP_B_PRICE_GROSS; ?></td>
                   <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_b_price_gross', $pInfo->products_group_b_price, 'OnKeyUp="updateNet()"'); ?></td>
                 </tr>
                 <tr>
                   <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                 </tr>
               <?
             }
             if ($group == "Group C") {
                ?>
                  <tr bgcolor="#ebebff">
                    <td class="main"><?php echo TEXT_PRODUCTS_GROUP_C_PRICE_NET; ?></td>
                    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_c_price', $pInfo->products_group_c_price, 'onKeyUp="updateGross()"'); ?></td>
                  </tr>
                  <tr bgcolor="#ebebff">
                    <td class="main"><?php echo TEXT_PRODUCTS_GROUP_C_PRICE_GROSS; ?></td>
                    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_c_price_gross', $pInfo->products_group_c_price, 'OnKeyUp="updateNet()"'); ?></td>
                  </tr>
                  <tr>
                    <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                  </tr>
                <?
            }
            if ($group == "Group D") {
              ?>
                  <tr bgcolor="#ebebff">
                    <td class="main"><?php echo TEXT_PRODUCTS_GROUP_D_PRICE_NET; ?></td>
                    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_d_price', $pInfo->products_group_d_price, 'onKeyUp="updateGross()"'); ?></td>
                  </tr>
                  <tr bgcolor="#ebebff">
                    <td class="main"><?php echo TEXT_PRODUCTS_GROUP_D_PRICE_GROSS; ?></td>
                    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_input_field('products_group_d_price_gross', $pInfo->products_group_d_price, 'OnKeyUp="updateNet()"'); ?></td>
                  </tr>
              <?
           }
      }
     ?>

		  
		  
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_VIRTUAL; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('products_virtual', '1', $is_virtual) . ' ' . TEXT_PRODUCT_IS_VIRTUAL . ' ' . zen_draw_radio_field('products_virtual', '0', $not_virtual) . ' ' . TEXT_PRODUCT_NOT_VIRTUAL . ' ' . ($pInfo->products_virtual == 1 ? '<br /><span class="errorText">' . TEXT_VIRTUAL_EDIT . '</span>' : ''); ?></td>
          </tr>

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main" valign="top"><?php echo TEXT_PRODUCTS_IS_ALWAYS_FREE_SHIPPING; ?></td>
            <td class="main" valign="top"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('product_is_always_free_shipping', '1', $is_product_is_always_free_shipping) . ' ' . TEXT_PRODUCT_IS_ALWAYS_FREE_SHIPPING . ' ' . zen_draw_radio_field('product_is_always_free_shipping', '0', $not_product_is_always_free_shipping) . ' ' . TEXT_PRODUCT_NOT_ALWAYS_FREE_SHIPPING  . '<br />' . zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('product_is_always_free_shipping', '2', $special_product_is_always_free_shipping) . ' ' . TEXT_PRODUCT_SPECIAL_ALWAYS_FREE_SHIPPING . ' ' . ($pInfo->product_is_always_free_shipping == 1 ? '<br /><span class="errorText">' . TEXT_FREE_SHIPPING_EDIT . '</span>' : ''); ?></td>
          </tr>

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_QTY_BOX_STATUS; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('products_qty_box_status', '1', $is_products_qty_box_status) . ' ' . TEXT_PRODUCTS_QTY_BOX_STATUS_ON . ' ' . zen_draw_radio_field('products_qty_box_status', '0', $not_products_qty_box_status) . ' ' . TEXT_PRODUCTS_QTY_BOX_STATUS_OFF . ' ' . ($pInfo->products_qty_box_status == 0 ? '<br /><span class="errorText">' . TEXT_PRODUCTS_QTY_BOX_STATUS_EDIT . '</span>' : ''); ?></td>
          </tr>

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>

          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY_MIN_RETAIL; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_quantity_order_min', ($pInfo->products_quantity_order_min == 0 ? 1 : $pInfo->products_quantity_order_min)); ?></td>
          </tr>

          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY_MAX_RETAIL; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_quantity_order_max', $pInfo->products_quantity_order_max); ?>  <?php echo TEXT_PRODUCTS_QUANTITY_MAX_RETAIL_EDIT; ?></td>
          </tr>

          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY_UNITS_RETAIL; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_quantity_order_units', ($pInfo->products_quantity_order_units == 0 ? 1 : $pInfo->products_quantity_order_units)); ?></td>
          </tr>

          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_MIXED; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('products_quantity_mixed', '1', $in_products_quantity_mixed) . ' ' . TEXT_YES . '  ' . zen_draw_radio_field('products_quantity_mixed', '0', $out_products_quantity_mixed) . ' ' . TEXT_NO; ?></td>
          </tr>

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>

<script language="javascript"><!--
updateGross();
//--></script>
<?php
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
            <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="main" width="25" valign="top"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
                <td class="main" width="100%">
        <?php if ($_SESSION['html_editor_preference_status']=="FCKEDITOR") {
                $oFCKeditor = new FCKeditor('products_description[' . $languages[$i]['id'] . ']') ;
                $oFCKeditor->Value = (isset($products_description[$languages[$i]['id']])) ? stripslashes($products_description[$languages[$i]['id']]) : zen_get_products_description($pInfo->products_id, $languages[$i]['id']) ;
                $oFCKeditor->Width  = '99%' ;
                $oFCKeditor->Height = '350' ;
//                $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;
//                $oFCKeditor->Create() ;
                $output = $oFCKeditor->CreateHtml() ;  echo $output;
          } else { // using HTMLAREA or just raw "source"

          echo zen_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', (isset($products_description[$languages[$i]['id']])) ? stripslashes($products_description[$languages[$i]['id']]) : zen_get_products_description($pInfo->products_id, $languages[$i]['id'])); //,'id="'.'products_description' . $languages[$i]['id'] . '"');
          } ?>
        </td>
              </tr>
            </table></td>
          </tr>
<?php
    }
?>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_model', $pInfo->products_model, zen_set_field_length(TABLE_PRODUCTS, 'products_model')); ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
<?php
  $dir = @dir(DIR_FS_CATALOG_IMAGES);
  $dir_info[] = array('id' => '', 'text' => "Main Directory");
  while ($file = $dir->read()) {
    if (is_dir(DIR_FS_CATALOG_IMAGES . $file) && strtoupper($file) != 'CVS' && $file != "." && $file != "..") {
      $dir_info[] = array('id' => $file . '/', 'text' => $file);
    }
  }
  sort($dir_info);

  $default_directory = substr( $pInfo->products_image, 0,strpos( $pInfo->products_image, '/')+1);
?>
21 Feb 2008, 5:32 AM
#40
silkenstrand avatar

silkenstrand

New Zenner

Join Date:
Jul 2005
Posts:
29
Plugin Contributions:
0

Re: Group Pricing Per Item Issue

hope i'm not annoying people... this is a freakishly long file

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_black.gif', '100%', '3'); ?></td>
          </tr>

          <tr>
            <td class="main" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
                <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_file_field('products_image') . ' ' . ($pInfo->products_image !='' ? TEXT_IMAGE_CURRENT . $pInfo->products_image : TEXT_IMAGE_CURRENT . ' ' . NONE) . zen_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>
                <td valign = "center" class="main"><?php echo TEXT_PRODUCTS_IMAGE_DIR; ?> <?php echo zen_draw_pull_down_menu('img_dir', $dir_info, $default_directory); ?></td>
						  </tr>
              <tr>
                <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15'); ?></td>
                <td class="main" valign="top"><?php echo TEXT_IMAGES_DELETE . ' ' . zen_draw_radio_field('image_delete', '0', $off_image_delete) . ' ' . TABLE_HEADING_NO . ' ' . zen_draw_radio_field('image_delete', '1', $on_image_delete) . ' ' . TABLE_HEADING_YES; ?></td>
	  	    	  </tr>

              <tr>
                <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15'); ?></td>
                <td colspan="3" class="main" valign="top"><?php echo TEXT_IMAGES_OVERWRITE  . ' ' . zen_draw_radio_field('overwrite', '0', $off_overwrite) . ' ' . TABLE_HEADING_NO . ' ' . zen_draw_radio_field('overwrite', '1', $on_overwrite) . ' ' . TABLE_HEADING_YES; ?>
                  <?php echo '<br />' . TEXT_PRODUCTS_IMAGE_MANUAL . ' ' . zen_draw_input_field('products_image_manual'); ?></td>
              </tr>
            </table></td>
          </tr>

          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_black.gif', '100%', '3'); ?></td>
          </tr>

<?php
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_URL . '<br /><small>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '</small>'; ?></td>
            <td class="main"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? $products_url[$languages[$i]['id']] : zen_get_products_url($pInfo->products_id, $languages[$i]['id'])), zen_set_field_length(TABLE_PRODUCTS_DESCRIPTION, 'products_url')); ?></td>
          </tr>
<?php
    }
?>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_weight', $pInfo->products_weight); ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_SORT_ORDER; ?></td>
            <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_sort_order', $pInfo->products_sort_order); ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td class="main" align="right"><?php echo zen_draw_hidden_field('products_date_added', (zen_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . zen_image_submit('button_preview.gif', IMAGE_PREVIEW) . '  <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
      </tr>
    </table></form>

completed!