NOTE: Make all tests in advanced theme
== Prepare ==
1. Open modules/in-commerce/units/products/products_event_handler.php in text editor
2. Look for
```
lang=php, name=products_event_handler.php
public function getPassedID(kEvent $event)
{
```
3. Add next code just after `{`
```
lang=php, name=products_event_handler.php
if ( $event->Special == 'test' ) {
return $this->Conn->GetOne('SELECT ProductId FROM ' . TABLE_PREFIX . 'Products WHERE SKU = "test"');
}
```
4. Save file and close.
5. Open themes/advanced/in-commerce/elements/content_boxes/featured_products.elm.tpl in text editor
6. Add next code at the beginning of file:
```
lang=html, name=featured_products.elm.tpl
<a href="<inp2:p.test_AddToCartLink template='in-commerce/checkout/shop_cart' product_template='__default__'/>" class="link-product2">Add test product to cart</a>
```
== Testing ==
# Go to `Admin Console`, {nav Website & Content > Structure & Data > Products}.
# Switch to `Products tab`.
# Click `New Product` button to create new product, select `Tangible` in dropown.
# On `General` tab enter any value to `Title`, 'test' to `SKU` and select 'Active' in `Status` radiobuttons.
# Go to `Pricing` tab.
# Enter 10 to `Price`.
# Click `Save` button to save product.
# Go to `Front-End`, {nav Products}.
# Click on `Add test product to cart` link at the top of main content block.
# Confirm that you redirected to shopping cart with your test product added.