Post by ultraspoon » Sat Mar 17, 2012 10:06 pm

Im looking for a mod that will basically duplicate the options value. so in admin you will have:

General Data Links Options Options2 Discount Special Image

And this has its own place in the database, so any data added does not go into the options value section.

Is there a mod like this or anything similar that I can edit?

Thanks

Active Member

Posts

Joined
Mon Oct 18, 2010 5:56 pm

Post by ultraspoon » Mon Mar 19, 2012 7:29 pm

So does anyone not have an idea on how I can duplicated the options page on the admin?

Active Member

Posts

Joined
Mon Oct 18, 2010 5:56 pm

Post by ultraspoon » Mon Mar 19, 2012 8:37 pm

I know I need to add some fields into the database.

From looking at the files, I think I only need to edit this information.

In view/template/catalog/product_form.tpl - duplicate this and edit accordingly.

Code: Select all

      <div id="tab_option">
        <div style="width: 100%; display: inline-block; padding-bottom: 5px;">
          <div style="width: 200px; height: 300px; float: left;">
            <select id="option" size="20" style="width: 100%;">
              <?php $option_row = 0; ?>
              <?php $option_value_row = 0; ?>
              <?php foreach ($product_options as $product_option) { ?>
              <option value="option<?php echo $option_row; ?>"><?php echo $product_option['language'][$language_id]['name']; ?></option>
              <?php if ($product_option['product_option_value']) { ?>
              <?php foreach ($product_option['product_option_value'] as $product_option_value) { ?>
              <?php foreach ($languages as $language) { ?>
              <?php if ($language['language_id'] == $language_id) { ?>
              <option value="option<?php echo $option_row; ?>_<?php echo $option_value_row; ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $product_option_value['language'][$language['language_id']]['name']; ?></option>
              <?php $option_value_row++; ?>
              <?php } ?>
              <?php } ?>
              <?php } ?>
              <?php } ?>
              <?php $option_row++; ?>
              <?php } ?>
            </select>
          </div>
          <div id="options" style="margin-left: 215px;">
            <div style="border-bottom: 1px solid #DDDDDD; text-align: right; padding-bottom: 10px; margin-bottom: 15px;"><a onclick="addOption();" class="button"><span><?php echo $button_add_option; ?></span></a></div>
            <?php $option_row = 0; ?>
            <?php $option_value_row = 0; ?>
            <?php foreach ($product_options as $product_option) { ?>
            <div id="option<?php echo $option_row; ?>" class="option">
              <table class="form">
                <tr>
                  <td><?php echo $entry_option; ?></td>
                  <td><?php foreach ($languages as $language) { ?>
					<?php if ($language['language_id'] == $language_id) { ?>
                    <input type="text" name="product_option[<?php echo $option_row; ?>][language][<?php echo $language['language_id']; ?>][name]" value="<?php echo $product_option['language'][$language['language_id']]['name']; ?>" onkeyup="$('#option option[value=\'option<?php echo $option_row; ?>\']').text(this.value);" />
                    <?php } else { ?>
                    <input type="text" name="product_option[<?php echo $option_row; ?>][language][<?php echo $language['language_id']; ?>][name]" value="<?php echo $product_option['language'][$language['language_id']]['name']; ?>" />
                    <?php } ?>
                    <img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /><br />
					<?php } ?></td>
                </tr>
                <tr>
                  <td><?php echo $entry_sort_order; ?></td>
                  <td><input type="text" name="product_option[<?php echo $option_row; ?>][sort_order]" value="<?php echo $product_option['sort_order']; ?>" size="2" /></td>
                </tr>
                <tr>
                  <td colspan="2"><a onclick="addOptionValue('<?php echo $option_row; ?>');" class="button"><span><?php echo $button_add_option_value; ?></span></a> <a onclick="removeOption('<?php echo $option_row; ?>');" class="button"><span><?php echo $button_remove; ?></span></a></td>
                </tr>
              </table>
            </div>
            <?php if ($product_option['product_option_value']) { ?>
            <?php foreach ($product_option['product_option_value'] as $product_option_value) { ?>
            <div id="option<?php echo $option_row; ?>_<?php echo $option_value_row; ?>" class="option">
              <table class="form">
                <tr>
                  <td><?php echo $entry_option_value; ?></td>
                  <td><?php foreach ($languages as $language) { ?>
                  <?php if ($language['language_id'] == $language_id) { ?>
                    <input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][language][<?php echo $language['language_id']; ?>][name]" value="<?php echo $product_option_value['language'][$language['language_id']]['name']; ?>" onkeyup="$('#option option[value=\'option<?php echo $option_row; ?>_<?php echo $option_value_row; ?>\']').text('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + this.value);" />
                    <?php } else { ?>
                    <input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][language][<?php echo $language['language_id']; ?>][name]" value="<?php echo $product_option_value['language'][$language['language_id']]['name']; ?>" />
                    <?php } ?>
                    <img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /><br />
					<?php } ?></td>
                </tr>
                <tr>
                  <td><?php echo $entry_quantity; ?></td>
                  <td><input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][quantity]" value="<?php echo $product_option_value['quantity']; ?>" size="2" /></td>
                </tr>
                <tr>
                  <td><?php echo $entry_subtract; ?></td>
                  <td><select name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][subtract]">
                      <?php if ($product_option_value['subtract']) { ?>
                      <option value="1" selected="selected"><?php echo $text_yes; ?></option>
                      <option value="0"><?php echo $text_no; ?></option>
                      <?php } else { ?>
                      <option value="1"><?php echo $text_yes; ?></option>
                      <option value="0" selected="selected"><?php echo $text_no; ?></option>
                      <?php } ?>
                    </select></td>
                </tr>
                <tr>
                  <td><?php echo $entry_price; ?></td>
                  <td><input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][price]" value="<?php echo $product_option_value['price']; ?>" /></td>
                </tr>
                <tr>
                  <td><?php echo $entry_prefix; ?></td>
                  <td><select name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][prefix]">
                      <?php  if ($product_option_value['prefix'] != '-') { ?>
                      <option value="+" selected="selected"><?php echo $text_plus; ?></option>
                      <option value="-"><?php echo $text_minus; ?></option>
                      <?php } else { ?>
                      <option value="+"><?php echo $text_plus; ?></option>
                      <option value="-" selected="selected"><?php echo $text_minus; ?></option>
                      <?php } ?>
                    </select></td>
                </tr>
                <tr>
                  <td><?php echo $entry_sort_order; ?></td>
                  <td><input type="text" name="product_option[<?php echo $option_row; ?>][product_option_value][<?php echo $option_value_row; ?>][sort_order]" value="<?php echo $product_option_value['sort_order']; ?>" size="2" /></td>
                </tr>
                <tr>
                  <td colspan="2"><a onclick="removeOptionValue('<?php echo $option_row; ?>_<?php echo $option_value_row; ?>');" class="button"><span><?php echo $button_remove; ?></span></a></td>
                </tr>
              </table>
            </div>
            <?php $option_value_row++; ?>
            <?php } ?>
            <?php } ?>
            <?php $option_row++; ?>
            <?php } ?>
          </div>
        </div>
      </div>
Then in admin/model/catalog/product.php

Im not sure about this one, options values are plastered everywhere in this file.

Active Member

Posts

Joined
Mon Oct 18, 2010 5:56 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 27 guests