Jump to content

ylli

Members
  • Posts

    15
  • Joined

  • Last visited

Profile Information

  • First Name
    Ylli
  • Last Name
    Bega

ylli's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Can you please be more specific ? What did you exactly do to fix this ?
  2. Hello, I have a problem with product refund. When i have an order that has been applied a coupon discount exp 10%. when i do the refund of one of the products of the order the product price is counted as the original price not the price with 10% discount so i am giving customers more money that they paid for the product. I know that the discount is applied to the total but when i refund i do that only for one product. is there any way to fix this ? Thank you
  3. Hello, i want to use ajax to get data from a controller. I have created a module and a front controller inside that module but when i try to get data from the tpl it shows me 404 not found. Can anyone help me to find whats wrong ? My controller is located in modules/ajaxcat/displaycats.php <?php Class ajaxcatDisplaycatsModuleFrontController extends ModuleFrontController { public function initContent() { parent::initContent(); $this->ajax = true; // enable ajax } public function displayAjax() { if ($this->errors) die(Tools::jsonEncode(array('hasError' => true, 'errors' => $this->errors))); else { switch (Tools::getValue('method')) { case 'getFirstCats' : die(Tools::jsonEncode(array('result' => "test"))); break; default: exit; } exit; } } ?> and the javascript code that i want to get data from this controller is : $.ajax({ type: 'get', url: baseUri+'modules/ajaxcat/displaycats', data: 'method=getFirstCats', dataType: 'json', success: function(json) { console.log(json); alert(json.result); } }); when i execute javascript code it shows me not found. How do i have to write the module url so i can access the controller? Thanks.
  4. Hello My product page is very slow. It takes 10 -12 seconds to load and when i activate debug profiling it shows that display si taking 10 seconds. What does this mean ? Can anone help me ? I am attaching an preview of my debug profiling .
  5. Hello i have a problem when i try to filter order by customer in the backend. this is the error i get : [PrestaShopDatabaseException] Unknown column 'customer' in 'having clause' SELECT COUNT(*) AS `tju_order` FROM `tju_orders` a LEFT JOIN `tju_customer` c ON (c.`id_customer` = a.`id_customer`) INNER JOIN `tju_address` address ON address.id_address = a.id_address_delivery INNER JOIN `tju_country` country ON address.id_country = country.id_country INNER JOIN `tju_country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = 1) LEFT JOIN `tju_order_state` os ON (os.`id_order_state` = a.`current_state`) LEFT JOIN `tju_order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = 1) WHERE 1 HAVING `customer` LIKE '%ylli%' LIMIT 1 at line 765 in file classes/db/Db.php 760. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 761. } 762. elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) 763. { 764. if ($sql) 765. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 766. 767. throw new PrestaShopDatabaseException($this->getMsgError()); 768. } 769. } 770. DbCore->displayError - [line 418 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 669 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 698 - classes/db/Db.php] - [2 Arguments] DbCore->getValue - [line 3198 - classes/controller/AdminController.php] - [2 Arguments] AdminControllerCore->getList - [line 2287 - classes/controller/AdminController.php] - [1 Arguments] AdminControllerCore->renderList - [line 435 - controllers/admin/AdminOrdersController.php] AdminOrdersControllerCore->renderList - [line 2015 - classes/controller/AdminController.php] AdminControllerCore->initContent - [line 180 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 54 - admin/index.php] can anyone help me solve this. i am trying to find the query but i could not find it.
  6. The post that you gave the link to solved my problem. Thank you
  7. Hello, thank you for the reply I am using a tpl template to generate pdf and using this code: $pdf = new PDF($this->boxes, PDF::TEMPLATE_AIRWAY,Context::getContext()->smarty); $pdf->render(true); This is how i generate barcode: $tcpdfbarcode = new TCPDFBarcode($order->getUniqReference(), EAN13); $bar = $tcpdfbarcode->getBarcodePNG(2, 30, array(0,0,0) ); and i assign the $bar to smarty data so i can print them in tpl template. Can you tell me how can i add this to smarty ? Thank you
  8. I have the same problem. Anyone found the solution to this ?
  9. Hello, I am generating pdf using this code: $pdf = new PDF($this->boxes, PDF::TEMPLATE_AIRWAY,Context::getContext()->smarty); $pdf->render(true); I want to know if is there a way to change the margins only for this generated pdf not for all the pdfs (that i can change in PDFGenerator.php). The object $pdf must have some method to edit or set margins only for this pdf that is generated. Anyone can help ? Thanks
  10. I have seen these line a lot bu i can not make them work. let me tell you what i have done till now. Well first i tried just two lines as you have shared, i created my .tpl file and added that file name as variable at pdf class. my .tpl template has just some text for the moment i have not aded any html using smarty. I have also created a file called HTMLTemplateInvoiceCustom.php at /classes/pdf but i can not connect these two together. can you guide me how the information flows starting ate my function that i have for the bulk action for the orders?
  11. Hello, I have created a new bulk actions for orders. What i want to do is generate a different kind of invoice for all the selected orders. I have created the action and i know how to get the order data i need but i am stuck in generating pdf. Is there any class or method that can generate pdf from an template (.tpl). Or any other way to generate the invoice using the template of course. the template does not have to be tpl it can be an word template or anything else. Any help on this ? Regards
  12. Hello, What i want to do is to add a new bulk actions to order listing page to generate Airway bill invoice. So when i check some orders and apply this bulk action it will generate for each of them one pdf invoice in the airway bill format. I have the format i just need some help setting this up because i am new to prestashop ( transfered from magento here). Anyone can help? Thanks
  13. Hello, I am thinking switching to prestashop from magento because magento needs expensive hosting to maintain good performance. I would like to know what is the performance of prestashop if i have 10000 products and up to 100 clients online at the same time. Assume i am using an average server to host my shop. What is prestashop average speed of loading ? And is it a good idea to switch from magento to prestashop for that many products i have ? Thanks
×
×
  • Create New...