Post by so-lj » Tue Aug 25, 2015 5:46 pm

I would like to write a simple code inside product page template which adds a default OPTION to all products within specific category (in my case laptops).

Meaning, i would like to avoid opencart PRODUCT OPTION system and also avoid adding product options to each product one by one.

I need a simple hardcoded (option names, prices coded in advance without setting anything inside admin panel) form with two optional checkboxes (add bag, add MS Office), which would - if selected add bag and/or microsoft office to cart alongside the chosen laptop. (also with increased price).

Code: Select all

$category = // category ID from product controller; 
<?php if($category==59) } ?>
<div>
<input type="checkbox" name="office" value="200"/> Add office (+200€)
<br/>
<input type="checkbox" name="bag" value="45"/> Add office (+45€)
</div>
<?php } ?>
It should trigger on "add to cart" button click, like original product option sistem.

Please give me some suggestions / solutions on how to proceed with this upgrade.

Newbie

Posts

Joined
Fri Apr 17, 2015 6:44 pm
Who is online

Users browsing this forum: No registered users and 3 guests