News:

Looking for documentation? Take a look on our wiki

Main Menu

How to plug the feedback sevice?

Started by fritz_pl, April 23, 2018, 14:32:05 PM

Previous topic - Next topic

fritz_pl

I have a problem with the integration of the store on VirtueMart 3.2.12 with feedback service "Opineo.pl".

Script from the instructions.

1. <script type='text/javascript'>
2. opi_email = 'client emails adress';
3. opi_order_no = '123456789';
4. opi_queue = 'send after X day';
5. opi_products = [
6. ['Samsung', 'Galaxy S8', '12345', '0'],
7. ['IPhone', '4S', '23456', '0']
8. ];
9. </script>
10. <script type='text/javascript' src='https://www.wiarygodneopinie.pl/shop/wo.js?uid=XXXXXXXXXX></script>

I wrote sth like this:

<?php
$i = 1;

foreach ($this->cart->products as $pkey => $prow) {
   $prow->prices = array_merge($prow->prices,$this->cart->cartPrices[$pkey]);
?>

<script type='text/javascript'>
2. opi_email = 'klient@poczta.pl';
3. opi_order_no = '<?php require_once(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'orders.php');
$order = VirtueMartModelOrders::getOrder($this->cart->virtuemart_order_id);
echo $order['details']['BT']->order_number; ?>';
4. opi_queue = '14';
5. opi_products = [
6. ['My Company', '<?php  echo $prow->product_name ?>', '<?php  echo $prow->product_sku ?>', '0'],
8. ];
9. </script>
10. <script type='text/javascript' src='https://www.wiarygodneopinie.pl/shop/wo.js?uid=XXXXXXXXXX></script>

Where is the problem and where I should put the code? Order_done.php?

Studio 42

In order done, but you have some errors