1. EDIT: admin/view/template/catalog/product_form.tpl
2. FIND:
3. REPLACE WITH:
But beware that it will always show NO even if you once set it to YES.
2. FIND:
Code: Select all
<?php if ($product_option_value['subtract']) { ?>
Code: Select all
<?php if (!$product_option_value['subtract']) { ?>
Hi,
I have edit the code to as below:
<?php if (!$product_option_value['subtract']) { ?>
but it remain "Yes"
I have edit the code to as below:
<?php if (!$product_option_value['subtract']) { ?>
but it remain "Yes"
Attachments
FireShot capture #321 - 'Products' - www_stepup_com_my_admin_index_php_route=catalog_product_insert&token=c826811d13b1f39a957f95f95dd5ad3c.png (81.19 KiB) Viewed 4052 times
That is for existing options.. You also need to change the other one for the dynamic option adding:
Find:
Flip the 2 around:
Find:
Code: Select all
html += '<option value="1"><?php echo $text_yes; ?></option>';
html += '<option value="0"><?php echo $text_no; ?></option>';
Code: Select all
html += '<option value="0"><?php echo $text_no; ?></option>';
html += '<option value="1"><?php echo $text_yes; ?></option>';
Can anyone help to set to always yes?
I have around 2,000 items and going one by one is insane.
Thanks
I have around 2,000 items and going one by one is insane.
Thanks
Just revert this process: http://forum.opencart.com/viewtopic.php ... 54#p178149 and it should always display as yes instead of no. However, if you did already applied the step above and you did already save the data from the form by setting one or multiple options to no and you're looking for to put them all back to yes option, I would suggest to make a backup of your database and to query all the no option into yes option from PHPMyAdmin to buy some time rather than editing the options one-by-one due to 2000 quantity of items.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Well i have uploaded all of my items with CSV import pro tool, but all of them are set to stock subtract=no
So what i need to do is set them all to yes, i don't quite understand what to reverse, from the code i see just a ! symbol added.
I'm fairly new to this and my store is both spanish and english so a little step by step will be greatly appreciated.
Thanks for the help, this is a nice cart with good support from the community.
So what i need to do is set them all to yes, i don't quite understand what to reverse, from the code i see just a ! symbol added.
I'm fairly new to this and my store is both spanish and english so a little step by step will be greatly appreciated.
Thanks for the help, this is a nice cart with good support from the community.
This is what i find when i search my code:
<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>
<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>
Since CSV Import Pro is a contribution, you should rather ask the author for any future importation you'd like to make on how to set the subtract option to yes instead of no by default straight from the module.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Qphoria wrote:That is for existing options.. You also need to change the other one for the dynamic option adding:
Find:Flip the 2 around:Code: Select all
html += '<option value="1"><?php echo $text_yes; ?></option>'; html += '<option value="0"><?php echo $text_no; ?></option>';
Code: Select all
html += '<option value="0"><?php echo $text_no; ?></option>'; html += '<option value="1"><?php echo $text_yes; ?></option>';
just for notes i found this at line 939 of admin/view/template/catalog/product_form.tpl in 1.5.1.3
to change existing ones just use phpmyadmin sql command
Or use this free tool to make the update: http://www.opencart.com/index.php?route ... order=DESCto change existing ones just use phpmyadmin sql command
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 203 guests