Post by apartamenti » Tue Sep 29, 2015 11:32 pm

Hello guys,

I am using latest opencart version 2.0.3.1 and my problem is, I have 3000 options for a product and when i add this options. That product page is not opening in backend. Only white page! Is there any way to add pagination to product options ?

Имоти - имоти под наем


User avatar
Newbie

Posts

Joined
Tue Sep 29, 2015 10:56 pm


Post by moebius » Fri Oct 02, 2015 12:03 am

Not nearly as many options (3) - but also having a problem with options in the "select" style: Options *not* displaying in the dropdown list - worst problem with Microsoft Edge, but also seeing the same issue in Mozilla.
This is a life & death situation for me, as I'm migrating to OpenCart from a competitor due to that one not working anymore after many years of success.
Please help!

Newbie

Posts

Joined
Thu Oct 01, 2015 1:44 pm

Post by apartamenti » Fri Oct 02, 2015 1:20 am

Did you try with default template ?

Имоти - имоти под наем


User avatar
Newbie

Posts

Joined
Tue Sep 29, 2015 10:56 pm


Post by Qphoria » Fri Oct 02, 2015 4:13 am

Too many post fields causes lots of issues. Your server needs to be able to support that many fields. Search post_max_size

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by moebius » Fri Oct 02, 2015 5:27 am

I only have 3 options, and can't get the dropdown working... can anyone help?

Newbie

Posts

Joined
Thu Oct 01, 2015 1:44 pm

Post by apartamenti » Fri Oct 02, 2015 11:03 pm

moebius wrote:I only have 3 options, and can't get the dropdown working... can anyone help?
Which template you are using ? Try with default template.

memory_limit and post_max_size resolved my problem but with 3000 product options the backend page is loading more than 20 seconds even i did not try to edit / update an option. Pagination for product options is necessary!

Имоти - имоти под наем


User avatar
Newbie

Posts

Joined
Tue Sep 29, 2015 10:56 pm


Post by Qphoria » Sat Oct 03, 2015 12:36 am

apartamenti wrote:
moebius wrote:I only have 3 options, and can't get the dropdown working... can anyone help?
Which template you are using ? Try with default template.

memory_limit and post_max_size resolved my problem but with 3000 product options the backend page is loading more than 20 seconds even i did not try to edit / update an option. Pagination for product options is necessary!
Pagination won't help the saving problem which is usually where things go wrong. Options really need to be saved individually over ajax

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by apartamenti » Sat Oct 03, 2015 1:54 am

I see. I hope they will fix that problem asap.

Имоти - имоти под наем


User avatar
Newbie

Posts

Joined
Tue Sep 29, 2015 10:56 pm


Post by Qphoria » Sat Oct 03, 2015 2:14 am

This will likely never be fixed. Your only options are
1. Use fewer options and make more base product variants
Instead of:

Code: Select all

Tshirt
 - Red/Sm
 - Red/Md
 - Red/Lg
 - Grn/Sm
 - Grn/Md
 - Grn/Lg
Do 2 products

Code: Select all

Red Tshirt:
  - Sm
  - Md
  - Lg

Code: Select all

Green Tshirt
 - Sm
 - Md
 - Lg
2. Increase your server settings for post_max_size, max_execution_time, and a few others (search google for max post size)

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mash0028 » Sat Oct 03, 2015 5:35 pm

Hi

I have the same problem with Options

I got this error

Notice: Undefined variable: options in /home2/berrylen/public_html/vqmod/vqcache/vq2_catalog_view_theme_ioc7_template_product_product.tpl on line 187

When products NO option.

I check with default theme, it was same with my codes. I dont know how can I resolve the issue.
<?php if ($options) { ?>
<h3><?php echo $text_option; ?></h3>
<?php foreach ($options as $option) { ?>
Maybe the wrong code is in the <?php if ($options) { ?>
but I dont know what wrong.


PLease help me

I post my product options code

Code: Select all

 <div id="product" class="product-options">
            <?php if ($options) { ?>
            <h3><?php echo $text_option; ?></h3>
            <?php foreach ($options as $option) { ?>
            <?php if ($option['type'] == 'select') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label>
              <select name="option[<?php echo $option['product_option_id']; ?>]" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control">
                <option value=""><?php echo $text_select; ?></option>
                <?php foreach ($option['product_option_value'] as $option_value) { ?>
                <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
                  <?php if ($option_value['price']) { ?>
                  (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                  <?php } ?>
                </option>
                <?php } ?>
              </select>
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'radio') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label"><?php echo $option['name']; ?></label>
              <div id="input-option<?php echo $option['product_option_id']; ?>">
                <?php foreach ($option['product_option_value'] as $option_value) { ?>
                <div class="radio">
                  <label>
                    <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" />
                    <?php echo $option_value['name']; ?>
                    <?php if ($option_value['price']) { ?>
                    (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                    <?php } ?>
                  </label>
                </div>
                <?php } ?>
              </div>
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'checkbox') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label"><?php echo $option['name']; ?></label>
              <div id="input-option<?php echo $option['product_option_id']; ?>">
                <?php foreach ($option['product_option_value'] as $option_value) { ?>
                <div class="checkbox">
                  <label>
                    <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" />
                    <?php echo $option_value['name']; ?>
                    <?php if ($option_value['price']) { ?>
                    (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                    <?php } ?>
                  </label>
                </div>
                <?php } ?>
              </div>
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'image') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label"><?php echo $option['name']; ?></label>
              <div id="input-option<?php echo $option['product_option_id']; ?>">
                <?php foreach ($option['product_option_value'] as $option_value) { ?>
                <div class="radio">
                  <label>
                    <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" />
                    <img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" class="img-thumbnail" /> <?php echo $option_value['name']; ?>
                    <?php if ($option_value['price']) { ?>
                    (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                    <?php } ?>
                  </label>
                </div>
                <?php } ?>
              </div>
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'text') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label>
              <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" />
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'textarea') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label>
              <textarea name="option[<?php echo $option['product_option_id']; ?>]" rows="5" placeholder="<?php echo $option['name']; ?>" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control"><?php echo $option['value']; ?></textarea>
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'file') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label"><?php echo $option['name']; ?></label>
              <button type="button" id="button-upload<?php echo $option['product_option_id']; ?>" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-default btn-block"><i class="fa fa-upload"></i> <?php echo $button_upload; ?></button>
              <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" id="input-option<?php echo $option['product_option_id']; ?>" />
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'date') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label>
              <div class="input-group date">
                <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-format="YYYY-MM-DD" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" />
                <span class="input-group-btn">
                <button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button>
                </span></div>
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'datetime') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label>
              <div class="input-group datetime">
                <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-format="YYYY-MM-DD HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" />
                <span class="input-group-btn">
                <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                </span></div>
            </div>
            <?php } ?>
            <?php if ($option['type'] == 'time') { ?>
            <div class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">
              <label class="control-label" for="input-option<?php echo $option['product_option_id']; ?>"><?php echo $option['name']; ?></label>
              <div class="input-group time">
                <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['value']; ?>" data-format="HH:mm" id="input-option<?php echo $option['product_option_id']; ?>" class="form-control" />
                <span class="input-group-btn">
                <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                </span></div>
            </div>

New member

Posts

Joined
Fri Jul 24, 2015 3:36 pm

Post by Qphoria » Mon Oct 05, 2015 9:54 pm

mash0028 wrote:Hi

I have the same problem with Options

I got this error

Notice: Undefined variable: options in /home2/berrylen/public_html/vqmod/vqcache/vq2_catalog_view_theme_ioc7_template_product_product.tpl on line 187

When products NO option.

I check with default theme, it was same with my codes. I dont know how can I resolve the issue.
This isn't even close to the same problem. This is a theme issue or a vQmod script you have running breaking things.
Switch back to the default theme and see if it works there. if it is still broken then start disabling vQmod scripts that deal with options until you find the culprit.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 2 guests