Post by hostimizer » Fri Oct 09, 2020 3:19 pm

hello sir

i want do 2 things in my opencart 3.0.2.0

1 : Option Values Quantity set default as 100
2 : when i add new product and when select option its automatically add all Option Value dont want to click on plus to add Option Value

Attachments

123.jpg

123.jpg (117.24 KiB) Viewed 1538 times


New member

Posts

Joined
Thu Feb 14, 2019 1:52 pm

Post by JNeuhoff » Fri Oct 09, 2020 4:47 pm

Have you searched the OpenCart marketplace for an extension doing this? I know there are some extensions for default option values.
If you can't find any, you may have to find a professional developer for this on the commercial section of this forum.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by hostimizer » Fri Oct 09, 2020 5:47 pm

thanaks for reply sir

i try to find but dont get any which allow me to do this options.

New member

Posts

Joined
Thu Feb 14, 2019 1:52 pm

Post by paulfeakins » Fri Oct 09, 2020 6:11 pm

hostimizer wrote:
Fri Oct 09, 2020 5:47 pm
i try to find but dont get any which allow me to do this options.
Well I Googled "opencart extensions default option values".

And the first result is: https://www.opencart.com/index.php?rout ... n_id=35549

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by hostimizer » Fri Oct 09, 2020 6:35 pm

not yet find any extension ... allow me to set values for option value quantity

New member

Posts

Joined
Thu Feb 14, 2019 1:52 pm

Post by letxobnav » Fri Oct 09, 2020 7:23 pm

admin/view/template/product/product_form.twig
change:

Code: Select all

	html += '  <td class="text-right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="" placeholder="{{ entry_quantity }}" class="form-control" /></td>';
to:

Code: Select all

	html += '  <td class="text-right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="100" placeholder="{{ entry_quantity }}" class="form-control" /></td>';

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by hostimizer » Sat Oct 10, 2020 2:22 pm

hello sir

thanks for reply

i dont get this location

i dont get product folder in this location
/admin/view/template

u am using opencart 3.0.2.0

New member

Posts

Joined
Thu Feb 14, 2019 1:52 pm

Post by hostimizer » Sat Oct 10, 2020 2:39 pm

Quantity set default to 100 DONE

/admin/view/template/catalog/product_form.twig
storage/modification/admin/view/template/catalog/product_form.twig

org

html += ' <td class="text-right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="" placeholder="{{ entry_quantity }}" class="form-control" /></td>';

replace to

html += ' <td class="text-right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="100" placeholder="{{ entry_quantity }}" class="form-control" /></td>';

thanks for help bro

New member

Posts

Joined
Thu Feb 14, 2019 1:52 pm

Post by JNeuhoff » Sat Oct 10, 2020 11:31 pm

You should never modify files in the storage/modification/ folder, the latter is only a cache for changed OpenCart core files.
Do you changes via an OCmod XML script, applied to the core file, and then in the admin backend do a Extensions > Modifications > Refresh

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: Bing [Bot], siptec and 236 guests