So far I have done the following:
Edit product.tpl and implement 2 buttons around our select element as follows:
<div id="minusBtn">-</div>
<select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print">
{foreach from=$group.attributes key=id_attribute item=group_attribute}
<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'html':'UTF-8'}">
{$group_attribute|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
<div id="plusBtn">+</div>
Then changed their style in product.css so they would look nicer.
Then implemented some custom JS into Custom Code as follows:
the following JS code:
var count = 1
document.getElementById('plusBtn').addEventListener('click', function()
{
if(count < document.getElementById('group_1').options.length)
{
count++
document.getElementById('group_1').value = count
} else
{
document.getElementById('group_1').value = 5
}
})
document.getElementById('minusBtn').addEventListener('click', function(){
if(count > 1){
count--
document.getElementById('group_1').value = count
} else{
document.getElementById('group_1').value = 1
}
})
Now issue is that this will use the code on all pages, something which I do not desire, I only want this piece of code on Product.tpl page, although adding it as in <script> tags, crashes the site(error 500).
Besides that, the price does not increase as in when chosing the option from the select element like a dropdown( this product has a combination list that impacts the price ) and when adding the product to cart, it does not add the chosen option, but the default one, as if it wasn't even chosen to begin with.