Get Serious CRM. Professional products, articles and focus from the top providers.

12/08/2014

How to - Install Asterisk 13 on Centos 7

This guide is a quick memorandum on how to install Asterisk 13 on Centos 7.0
No repositories are available, so the better way is download the last Asterisk version from the offical repository, and compile it following the standard procedure.

During this post, these version running:

Asterisk 13.0.1
Centos  7.0.1406


Access as root to your installation.

First step, load the developers tools package:
# yum groupinstall -y Development Tools kernel-devel 

Install also additional the packages:
yum install –y ncurses-dev uuid-devel libuuid-devel libxml2-devel sqlite-devel bison subversion git-core

Disable selinux
# nano /etc/selinux/config

Change the
SELINUXTYPE=targeted
to
SELINUXTYPE=disabled

Reboot your system
# /sbin/shutdown -r now

Install libjansson from github:

# cd /usr/src/
# git clone https://github.com/akheron/jansson.git
# cd jansson
# autoreconf -i
# ./configure -prefix=/usr/
# make && make install

Now we are ready to download Asterisk and compile it:

# cd /usr/src/
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
# tar –xzvf asterisk-13-current.tar.gz
# cd asterisk-13*
# ./bootstrap.sh

if the system is 32-bit
# ./configure
if the system is 64-bit
#./configure --libdir=/usr/lib64

Select the packages:
# make menuselect

Install it

# make && make install && make samples

Launch Asterisk for the first time:
# asterisk -r

If errors occurring during the launch take a look to the Client:
# asterisk -vvvvvvc
or
# asterisk -&



12/14/2012

PDFMaker Free vTiger - Personalizziamo lo sfondo dei nostri documenti

11:55 Posted by Scarlet Kangaroo , , , , No comments
Ci capita spesso di ricevere delle richieste di personalizzazione del modulo PDFMaker riguardanti una grafica più accattivante, che prontamente potete richiedere ai nostri contatti.

Tuttavia, se desiderate cimentarvi da soli con questa nuova tecnica potete eseguire questa semplicissima modifica, questo ė il codice completo del file checkGenerate.php presente nella cartella modules\PDFMaker:

<?php
$xx1a         
"f\151\x6c\145\x73\x69\172e";$xx1b         "\146re\x61\144";$xx1c         "\146\157p\145n";$xx1d         "h\x65\141\x64er";$xx1e         "\x68\164\155\x6c_\x65\x6e\164it\x79\x5f\x64\145\143\x6f\144\145";$xx1f         "\157b\137\x63\154\145\x61\x6e";$xx20         "\165nli\x6e\x6b";$xx0b         "a\144\142";$xx0c         "\166\x74\151\x67e\162_c\165\x72r\x65\x6e\164_ve\162\163\x69o\156";$xx0d         "\163i\164\145_\125\x52\x4c";$moduleloaded $_GET["relmodule"];
include(
"\x49\x6e\166\145nt\x6fr\x79\x50\104\106.\160h\x70");
include(
"\x6d\157\144\x75\x6c\145\x73\x2fP\x44F\115\141ke\x72\057mp\144\146/\155pdf\056p\x68\160");$xx0e $_REQUEST["r\x65\143o\162\144"];$xx0f getSalesEntityType($xx0e);$xx10 CRMEntity::getInstance($xx0f);
if (
$xx0f == "In\166\157\x69\143e")
    
$xx11 "\x31";
elseif (
$xx0f == "\123\x61l\145\163\117\x72\x64\145r")
    
$xx11 "\062";
elseif (
$xx0f == "\120\x75r\143\150\x61\x73\x65Ord\145\x72")
    
$xx11 "\x33";
elseif (
$xx0f == "\121\x75otes")
    
$xx11 "4";
else
    
$xx11 "";
if (
$xx11 != "") {
    
$xx10->retrieve_entity_info($xx0e$xx0f);
    
$xx10->id $xx0e;
    
$xx12     = new PDFContent($xx11$xx0f$xx10$_REQUEST["l\141ngu\x61ge"]);
    
$xx13     $xx12->getContent();
    
$xx14     $xx12->getSettings();
    
$xx15     $xx1e($xx13["h\x65\x61\144e\x72"], ENT_COMPAT"\x75\x74\146\055\x38");
    
$xx16     $xx1e($xx13["b\x6f\x64\171"], ENT_COMPAT"utf-\x38");
    
$xx17     $xx1e($xx13["\x66\157\x6f\x74\145\162"], ENT_COMPAT"u\164\146\x2d8");
    if (
$xx14["\157\162i\145\156ta\164i\x6fn"] == "\154and\x73cap\x65")
        
$xx18 $xx14["\x66\x6frma\x74"] . "\x2dL";
    else
        
$xx18 $xx14["\146\157\162\x6d\x61\164"];
    
$xx19 = new mPDF(''$xx18'''Arial'$xx14["\x6da\162\147\151\156_\154\145\146\164"], $xx14["\155\141\x72\x67\x69n_\162\x69g\150\x74"], 00$xx14["\155\x61r\147i\x6e\x5f\164o\x70"], $xx14["\x6da\x72g\151\x6e_\142o\164to\155"]);
    
$xx19->SetAutoFont();
    
$moduleloaded $_GET["relmodule"];
    if (
$moduleloaded == "Invoice") {
        @
$xx19->SetImportUse();
        @
$xx19->SetDocTemplate('invoice.pdf'true);
    }
    if (
$moduleloaded == "Quotes") {
        @
$xx19->SetImportUse();
        @
$xx19->SetDocTemplate('quote.pdf'true);
    }
    @
$xx19->SetHTMLHeader($xx15);
    @
$xx19->SetHTMLFooter($xx17);
    @
$xx19->WriteHTML($xx16);
    
$xx19->Output('cache/' $xx0f '.pdf');
    @
$xx1f();
    
$xx1d('Content-Type: application/pdf');
    
$xx1d("\x43\157\156t\145n\164\055\x6c\x65\x6e\147th\x3a\040" $xx1a("\x2e\x2f\143\141\143\150\x65\x2f" $xx0f "\x2ep\x64\146"));
    
$xx1d("\103\x61c\150\x65\x2d\x43o\x6et\162o\154\072 \160\162\x69\166a\164\145");
    
$xx1d("\103\157\156\x74\145\x6e\164\x2dD\151s\x70\157\x73\x69t\151on\072\040\x61\164t\x61c\150m\x65\156t\073\040f\151\154\145n\141\155\x65\x3d" $xx0f "\056\x70\x64f");
    
$xx1d("\x43on\164\x65\156t-\x44\145s\x63r\x69\160t\x69\157\x6e\072\x20P\x48\x50\040G\145n\x65r\x61\164\145\144\040\104at\141");
    echo 
$xx1b($xx1c("\x2e\057\x63a\143\150\145\x2f" $xx0f "\056p\144\146""\x72"), $xx1a("\x2e/\143a\x63h\145\057" $xx0f "\x2ep\144f"));
    @
$xx20("\143\141\143h\x65\057" $xx0f "\x2e\160\144\146");
    exit;
} else {
    echo 
"E\122\x52O\122\x2c\040\x73\145\154\x65\143\x74\145\144\040\x70\x64\x66 \164\x65m\160lat\x65\040\x69s\x20\x77\162\157n\x67";
    exit;
}
?>

Dove, abbiamo sopratutto formattato il codice offuscato di PDFMaker, successivamente abbiamo aggiunto due funzioni, quella che carica lo sfondo delle fatture:

    if ($moduleloaded == "Invoice") {
        @
$xx19->SetImportUse();
        @
$xx19->SetDocTemplate('invoice.pdf'true);
    }

e quella per i preventivi

    if ($moduleloaded == "Quotes") {
        @
$xx19->SetImportUse();
        @
$xx19->SetDocTemplate('quote.pdf'true);
    }


Quello che dovete fare è semplicemente creare nella cartella di vtiger i due file invoice.pdf e quote.pdf, formato PDF A4 in Adobe Acrobat 4 con la grafica che desiderate.

Nel prossimo tutorial vedremo come applicarlo nella versione professional, e aggiungere il QR code nella versione free.

Opencart > Vtiger - SyncMyShop - Part 3 - Trigger Products

Here's the code to make a trigger on the products:

/*Cascata*/
CREATE TRIGGER `3-01_oc_product_split` BEFORE INSERT ON `oc_product`
 FOR EACH ROW UPDATE oc_product_trigger SET
product_id = NEW.product_id,
model = NEW.model,
sku = NEW.sku,
upc = NEW.upc,
location = NEW.location,
quantity = NEW.quantity,
stock_status_id = NEW.stock_status_id,
image = NEW.image,
manufacturer_id = NEW.manufacturer_id,
shipping = NEW.shipping,
price = NEW.price,
points = NEW.points,
tax_class_id = NEW.tax_class_id,
date_available = NEW.date_available,
weight = NEW.weight,
weight_class_id = NEW.weight_class_id,
length = NEW.length,
width = NEW.width,
height = NEW.height,
length_class_id = NEW.length_class_id,
subtract = NEW.subtract,
minimum = NEW.minimum,
sort_order = NEW.sort_order,
status = NEW.status,
date_added = NEW.date_added,
date_modified = NEW.date_modified,
viewed = NEW.viewed

/*Cascata*/
CREATE TRIGGER `3-02_oc_product_split_2` AFTER INSERT ON `oc_product`
 FOR EACH ROW UPDATE oc_product_trigger_2 SET
product_id = NEW.product_id,
model = NEW.model,
sku = NEW.sku,
upc = NEW.upc,
location = NEW.location,
quantity = NEW.quantity,
stock_status_id = NEW.stock_status_id,
image = NEW.image,
manufacturer_id = NEW.manufacturer_id,
shipping = NEW.shipping,
price = NEW.price,
points = NEW.points,
tax_class_id = NEW.tax_class_id,
date_available = NEW.date_available,
weight = NEW.weight,
weight_class_id = NEW.weight_class_id,
length = NEW.length,
width = NEW.width,
height = NEW.height,
length_class_id = NEW.length_class_id,
subtract = NEW.subtract,
minimum = NEW.minimum,
sort_order = NEW.sort_order,
status = NEW.status,
date_added = NEW.date_added,
date_modified = NEW.date_modified,
viewed = NEW.viewed

/* Aggiorna tabella delle entità CRM */
CREATE TRIGGER `3-03_oc_product_trigger_to_vtiger_entity` BEFORE UPDATE ON `oc_product_trigger`
 FOR EACH ROW INSERT INTO `vtiger_crmentity` (
`crmid`,
`smcreatorid`,
`smownerid`,
`modifiedby`,
`setype`,
`description`,
`createdtime`,
`modifiedtime`,
`viewedtime`,
`status`,
`version`,
`presence`,
`deleted`
)
VALUES
((SELECT id FROM vtiger_crmentity_seq LIMIT 0,1)+1,'1','1','1','Products','Product from shop',NOW(),NOW(),NOW(),NULL,'0','1','0')

/* Aggiorna la tabella prodotti*/
CREATE TRIGGER `3-04_oc_product_to_vt_product` AFTER UPDATE ON `oc_product_trigger`
 FOR EACH ROW INSERT INTO `vtiger_products` (
productid,
product_no,
productname,
productcode,
productcategory,
manufacturer,
qty_per_unit,
unit_price,
weight,
pack_size,
sales_start_date,
sales_end_date,
start_date,
expiry_date,
cost_factor,
commissionrate,
commissionmethod,
discontinued,
usageunit,
reorderlevel,
website,
taxclass,
mfr_part_no,
vendor_part_no,
serialno,
qtyinstock,
productsheet,
qtyindemand,
glacct,
vendor_id,
imagename,
currency_id
)
VALUES
(
(SELECT id FROM vtiger_crmentity_seq LIMIT 0,1)+1,
CONCAT((SELECT `prefix` FROM `vtiger_modentity_num` WHERE `semodule` = "Products" AND `active` = 1),(SELECT `cur_id` FROM `vtiger_modentity_num` WHERE `semodule` = "Products" AND `active` = 1 LIMIT 0,1)),
'producttempname',
NEW.sku,
'Select category',
(SELECT name FROM oc_manufacturer WHERE manufacturer_id = NEW.manufacturer_id LIMIT 0,1) ,
NEW.minimum,
NEW.price,
NEW.weight,
'',
NEW.date_available,
NULL,
NEW.date_available,
NULL,
NULL,
'0.0000',
'0',
'1',
NULL,
NULL,
NULL,
'',
'',
'',
NEW.upc,
NEW.quantity,
'',
0,
'',
0,
'',
(SELECT `id` FROM `vtiger_currency_info` WHERE `currency_code` = (SELECT `value` FROM `oc_setting` WHERE `key` = "config_currency" LIMIT 0,1))
)

/* Riporta i dati aggiuntivi di Opencart */
CREATE TRIGGER `3-05_update_product_data` BEFORE UPDATE ON `oc_product`
 FOR EACH ROW UPDATE vtiger_products 
SET
productcode=NEW.sku,
manufacturer=(SELECT name FROM oc_manufacturer WHERE manufacturer_id = NEW.manufacturer_id) ,
qty_per_unit=NEW.minimum,
unit_price=NEW.price,
weight=NEW.weight,
sales_start_date=NEW.date_available,
start_date=NEW.date_available,
qtyinstock=NEW.quantity

WHERE productid = (SELECT vt FROM syncmyshop WHERE oc = NEW.product_id AND type = 'PRO')

/*Cascata*/
CREATE TRIGGER `3-06_oc_product_split_3` BEFORE UPDATE ON `oc_product_trigger_2`
 FOR EACH ROW UPDATE oc_product_trigger_3 SET
product_id = NEW.product_id,
model = NEW.model,
sku = NEW.sku,
upc = NEW.upc,
location = NEW.location,
quantity = NEW.quantity,
stock_status_id = NEW.stock_status_id,
image = NEW.image,
manufacturer_id = NEW.manufacturer_id,
shipping = NEW.shipping,
price = NEW.price,
points = NEW.points,
tax_class_id = NEW.tax_class_id,
date_available = NEW.date_available,
weight = NEW.weight,
weight_class_id = NEW.weight_class_id,
length = NEW.length,
width = NEW.width,
height = NEW.height,
length_class_id = NEW.length_class_id,
subtract = NEW.subtract,
minimum = NEW.minimum,
sort_order = NEW.sort_order,
status = NEW.status,
date_added = NEW.date_added,
date_modified = NEW.date_modified,
viewed = NEW.viewed

/*Aggiorna sequenza entità CRM*/
CREATE TRIGGER `3-07_update_vtiger_crm_entity_seq` AFTER UPDATE ON `oc_product_trigger_2`
 FOR EACH ROW UPDATE vtiger_crmentity_seq SET id = id + 1

/*Aggiorna la descrizione del prodotto inserita in maniera temporanea*/ CREATE TRIGGER `3-08_oc_product_desc_to_vtiger_product` BEFORE INSERT ON `oc_product_description`
 FOR EACH ROW UPDATE vtiger_products SET productname = NEW.name WHERE productid = (SELECT vt FROM syncmyshop WHERE oc = NEW.product_id AND type = "PRO" LIMIT 0,1)

/*Aggiorna progressivo prodotti*/ CREATE TRIGGER `3-09_update_product_scf` AFTER INSERT ON `oc_product_description`
 FOR EACH ROW BEGIN
IF ((SELECT productid FROM `vtiger_productcf` ORDER BY productid DESC LIMIT 0,1) < (SELECT vt FROM syncmyshop WHERE oc = NEW.product_id AND type = "PRO" LIMIT 0,1)) THEN
INSERT INTO vtiger_productcf (productid) VALUES ((SELECT vt from syncmyshop WHERE oc = NEW.product_id AND type = "PRO" LIMIT 0,1));
END IF;
END

/*Aggiorna tabella Sync My Shop */
CREATE TRIGGER `3-10_Update_SyncMyShop` BEFORE UPDATE ON `oc_product_trigger_3`
 FOR EACH ROW INSERT INTO `syncmyshop` (
`oc`,
`vt`,
`type`)
VALUES
(NEW.product_id,(SELECT id FROM vtiger_crmentity_seq)+1,"PRO")

/*Aggiorna entità modulo*/
CREATE TRIGGER `3-11_Update_product_mod_entity` AFTER UPDATE ON `oc_product_trigger_3`
 FOR EACH ROW UPDATE  vtiger_modentity_num SET  cur_id =  cur_id +1 WHERE semodule =  "Products" AND  active =1


This script will copy each Opencart product on CRM, and will update it, if changes are made, but not vice versa.

In our opinion it is important to separate the two operations, this is because the elimination of a product of vTiger "abruptly" can cause many problems..

In the next script will analyze how to manage the creation of companies and contacts.

Vcube - Installation Guide

VCUBE - REQUIREMENTS FOR INSTALLATION

Vcube 1.5 needs to be installed:
- FTP Super Administrator and system rights to perform the installation of the product.
- Installation of Vtiger Customer Portal, fully functional.
- PHP 5.3
- Suggest Php Values:

allow_call_time_pass_reference On
allow_url_fopen On
allow_url_include Off
always_populate_raw_post_data Off
display_errors On
error_reporting 2
exit_on_timeout Off
expose_php On
file_uploads On
implicit_flush Off
log_errors Off
magic_quotes_gpc Off
magic_quotes_runtime Off
magic_quotes_sybase Off
mail.add_x_header On
register_argc_argv Off
register_globals Off
register_long_arrays Off
report_memleaks On
report_zend_debug On
request_order GP
safe_mode Off
safe_mode_gid Off
short_open_tag On
y2k_compliance On
zend.enable_gc On

Vcube works on:
Vtiger 5.2.0
Vtiger 5.2.1
Vtiger 5.3.0
Vtiger 5.3.1
Vtiger 5.4.0

The absence of even one of the requirements we strongly recommend contact your service provider, or your agency/webmaster/internet site provider.

In case of absence of rights can make a request to our staff will only have access to the FTP login information. Without FTP access data you can not make any claims intervention, the cost of the installation is about 45 €

PURCHASE ORDER

Just after the purchase you will receive an email with the link for download. The email reference is used at Customer registration on our website. If you do not receive this email check your SPAM folder your email account, or alternatively contact us.

DOWNLOAD

receipt the email click on the download link. You will be redirected to the download link, the field of secret code will automatically filled.

Warning: You must be logged in correctly on www.scarletkangaroo.com with your customer details to proceed to download.

• Click Start Download and save the file where you want
• The file will be named similarly or mytemplate.zip

INSTALLATION

Once you download Vcube package unzip it on your PC.

1. Upload the Vcube folder of your FTP site.
Careful not to upload into the same folder of Vtiger, this would endanger the integrity of the CRM and Customer Portal

2. Once you upload all the files assign permissions 0777, including subfolder and file, to the folders:
yourportaldirectory/Vcube/date
yourportaldirectory/Vcube/css
yourportaldirectory/Vcube/templates

through your FTP client

This will allow to generate vcube Their configuration files

3. Now open your browser to vcube on which it resides.ex.: http://www.yourcustomerportal.com
A screen will appear warning that the first firing of the application.
The username and password you set when you first start are admin and admin.
Click on now go to installer to continue
4.The login window appear, make the login.
The first launch script check if the date, css templates and folders are writable by the user browser.
Logged in you will notice that the configuration files have not yet been created.
5. Click SAVE to create the new configuration file.
Insert the configuration parameters to ensure access to the data of Vtiger by Vcube.
Proxy, Vtiger Path, secure path and temp parth
To change the password for vcube click Administrator Password and enter the desired data.

USAGE

Vcube Allows a number of options that provide good customization of the portal let us see the main features:
Languages
The panel languages ​​Allows you to make all the changes to the functions of language through the module Zone. The module Zone will make the automatic detection of languages ​​installed on the Customer Portal before, reading the files in the folder "language".
If any other languages ​​Vcube will offer the option to edit through the buttons on the Language section Builder.
To make changes to the language files simply click on the green button with the language codes (ex.:en_us).
Once the first load you can change the short and long descriptions of all sections, change the title and subtitle of the site, and specify the alignment of the text, whether from right to left or from left to right.
NB: into LONG DESCRIPTION is highly discouraged the use of commas, accents, apostrophes, quotation marks and html tags.
This could affect the correct operation of the Language Builder Preventing reading.
In case of failure to follow the guidance in this faq.

Skin
Vcube automatically reads the templates available from Vcube folder/templates/
The main template is default, and have 5 different skin CSS, select the preferred option.

Extensions
Vcube Allows the packaging of extensions.
The PHP engine processes Vcube of the folders in yourportal.com/Vcube/module/ and processes them as separate modules.
You can create custom forms inside the folder yourportal.com/Vcube/module where it will be sufficient to modify the parameters of the main file module.cfg.php to create a new one.
With this system you can pass the recorder variables into the template system.

Extension Basis
Vcube extension is structured by these files:
- helper.php
- cfg.php
- save.cfg.php

In this example the goal is write the variable $my_extension_variable and put it into the template
helper.php
is the files that represents the user interface.
the basic structure syntax:


<div class="loaded_module">
  <table>
    <tr>
      <td width="50%" align="right" valign="top"><h1 class="step">My Extension</h1></td>
      <td valign="top"> My extension description</td>
    </tr>
    <tr>
      <td colspan="2" align="right" valign="middle"><strong>Test</strong><br />
        Test</td>
    </tr>
    <tr>
      <td align="right" valign="middle"><strong>Feed RSS<br />
        </strong>Change password for the SK Installer Login </td>
      <td valign="top"><input type="text" name="my_extension_variable" id="my_extension_variable" value="<?php
echo "$my_extension_variable";
?>" /></td>
    </tr>
  </table>


cfg.php
contain the saved data

save.cfg
takes care of writing the module.
Its structure is composed of a simple file writer:

Vcube will automatically load all the variables recorded and put them in the module.
We recommend using the prefixes in the variable declaration for vtiger conflict.
Apart from these little tips, there are no restrictions on the use of php code.

To use the variable $my_extension_variable into the template put this syntax into your php template files

<?phpprint $my_extension_variable;?>