Интегрировать два плагина WordPress
Решил интегрировать между собой два плагина, а php код правильно в файл ставить не получается.
Плагины Quick Shop + Secure and accessible form (gbcf)
Один из плагинов делает корзину покупки в WordPress (Quick Shop), другой делает форму отправки по Email (gbcf)
Инструкция вставки кода для интеграции:
*WP-GBCF*
If you want shipping calculated as well in this form I'll add it here as soon as I can...
You must remember with the following code to remove all backticks: `
Also WP-GBCF has been updated (v. 2008.02.07). I've give updated line numbers and new code below. If you want old code see a pre 1.3.4 QuickShop README.
Add this after Line 1220 of WP-GBCF V2.0 (wp-gbcf_form.php):
--------------------------------------------
`unset($_SESSION['qscart']); // This line clears the cart after the email is sent.`
--------------------------------------------
Starting from Line 1286 - 1289 of WP-GBCF V. 2.0 (wp-gbcf_form.php):
--------------------------------------------
`$forms.=('
'.$x_or_h_br.'
Message'.$x_or_h_br.'
// Add quickshop integration by adding the cart info into the text area.
if ($_SESSION['qscart'] && is_array($_SESSION['qscart']))
{
$forms .= ('I would like to order the following items:
');
foreach ($_SESSION['qscart'] as $item)
{
$forms .= ("".$item['name']." - Price: $".$item['price']." - Quantity: ".$item['quantity']."
");
}
}
$forms.=(''.$x_or_h_br.'`
Выберу исполнителя с лучшей ценой