06
Abr

Calcbuilder extended: HikaShop integration

  • Font size: Larger Smaller
  • Hits: 4671
  • Print

In order to link the results of your calculator with hika shop cart you only need to add some extra lines at the end of your calculator code:

//Modify these parameters according to your product

//QTY

$hk_quantity=1;

//NAME

$hk_product_name='Test';

//LONG DESCRIPTION

$hk_product_description='Description';

//PRICE $hk_pricehikaproduct=10;

//CODE

$hk_product_code='COD';

Just replacing the results in bold for your own results or calculations
. If you go to your module configuration, you must enable the switch 'Add to cart button (Hikashop)', so the calculator will link with hikashop checkout when clicked.
The calculator will show the results and also a new button at the bottom 'add to cart', which is in charge of creating the new product according to the configuration, add it to the cart and redirect to default checkout.

There are extra options that you also can add to the new product. If you need to set any product attribute present at the hikashop_product table, you can add this code and fill the needed parameters:

//More options (from #_hikashop_product table)

$hk_productfields=array();

$hk_productfields['product_width']=23;

$hk_productfields['product_length']=12;

And finally, you can also attach a pdf to the new product, that will be created according to print preferences and can be downloaded once user completes payment. Only a couple of extra lines are needed to enable this function:

//Complete file parameters in order to attach a pdf file to your product

$hk_file_name='PDFFile';

$hk_file_description='File Attached';

You can follow this video that shows how to link the results of the calculator with a hikashop checkout in a few minutes:

Last modified on
Trackback URL for this blog entry.
FaLang translation system by Faboba

Lo que nuestros clientes opinan de nosotros