-
Posts
924 -
Joined
-
Last visited
-
Days Won
9
Crezzur.com last won the day on October 16 2021
Crezzur.com had the most liked content!
About Crezzur.com
- Birthday 05/08/1991
Contact Methods
- Website
- Skype
Profile Information
-
Location
België - Antwerpen
-
First Name
Jaimy
-
Activity
Web Development Agency
Recent Profile Visitors
Crezzur.com's Achievements
-
Restore Backup causing many errors (help)
Crezzur.com replied to d2iautosound's topic in General topics
Prestashop 8.x is supported up to php 8.1 -
Crezzur.com started following API create invoice , Restore Backup causing many errors (help) , Upgrading from 1.6.1.24 to most stable version and 5 others
-
Restore Backup causing many errors (help)
Crezzur.com replied to d2iautosound's topic in General topics
-
Emails contact_form displaying variables like {firstname} {lastname}
Crezzur.com replied to Koukay's topic in Bug reports
You could try to upload a fresh /mails/ folder to your server to see if this helpt resolving the issue. -
500 Error After Going to Catalog mode
Crezzur.com replied to Bamphalas's topic in Configuring and using PrestaShop
try regenerating your .htaccess in you main root file and using CTRL + F5 -
500 Error After Going to Catalog mode
Crezzur.com replied to Bamphalas's topic in Configuring and using PrestaShop
The function get_magic_quotes_gpc is deprecated since PHP 7.4. So my guess is that you have a Prestashop store with a version < than 1.8 and using PHP 8. This is not possible, look at the PHP compatibility chart to see which PHP version your webshop supports. https://devdocs.prestashop-project.org/1.7/basics/installation/system-requirements/#php-compatibility-chart -
pass order reference to the payment gateway
Crezzur.com replied to pg_dev's topic in Core developers
If i understand your question correctly you want to send the reference on order completion correct? In this case you need to use the DisplayOrderConfirmation hook, for example like we use it in one of our projects: public function hookDisplayOrderConfirmation($params) { $order = $params['order']; $products = $params['order']->getProducts(); $customer = new Customer((int)$order->id_customer); $delivery = new Address((int) $order->id_address_delivery); $country = new Country($delivery->id_country); require_once($this->getLocalPath() .'crezzurApi.php'); $api = new CrezzurApi(); $order_exist = $api->findOrder($order->reference); if (!$order_exist) { $api->insertOrder($order->reference); // PREVENT MULTIPLE INSERTS $xml_customer = "<?xml version='1.0' standalone='yes'?> <customer> <email>$customer->email</email> <bedrijfsnaam>$delivery->company</bedrijfsnaam> <btwnummer>$delivery->vat_number</btwnummer> <aanspreek></aanspreek> <name>$delivery->lastname</name> <firstname>$customer->firstname</firstname> <middlename/> <phone>$delivery->phone</phone> <gsm>$delivery->phone_mobile</gsm> <adres> <straat>$delivery->address1</straat> <huisnummer/> <toevoeging/> <land>$country->iso_code</land> <postcode>$delivery->postcode</postcode> <stad>$delivery->city</stad> </adres> </customer>"; $apiuser = $api->createCustomer($xml_customer); $xml_order = "<?xml version='1.0' standalone='yes'?> <order> <customer_id>". $apiuser['id'] ."</customer_id> <order_id>Webshop: $order->reference</order_id> <delivery_date></delivery_date> <base_subtotal>". Tools::ps_round($order->total_paid, 2) ."</base_subtotal> <base_shipping_amount>". Tools::ps_round($order->total_shipping_tax_incl, 2) ."</base_shipping_amount> <vat_regime>BI</vat_regime> <notes>Bestelling geplaatst via webshop.</notes> <payment_method>". Tools::substr($order->payment, 0, 32) ."</payment_method> <shipping_method></shipping_method> <articles>"; foreach ($products as $key => $product) { $xml_order .= "<article> <sku>". $product['product_ean13'] ."</sku> <count>". $product['product_quantity'] ."</count> <price_ex>". Tools::ps_round($product['product_price'], 2) ."</price_ex> <price>". Tools::ps_round($product['product_price_wt'], 2) ."</price> <articlename/> </article>"; } $xml_order .= "</articles></order>"; $apiorder = $api->createOrder($xml_order); echo '<pre class="prettyprint linenums">Klant aangemaakt met ID '. $apiuser['id'] .' en order ID '. $apiorder['id'] .'</pre>'; } -
Emails contact_form displaying variables like {firstname} {lastname}
Crezzur.com replied to Koukay's topic in Bug reports
Welcome to the PrestaShop forums @Koukay I would advice you to update to PrestaShop 1.7.7+ since the issue will be resolved automatically. You can make a copy of your current store and try to upgrade it to see if you have any errors, if not you can push this to your live environment. My post which you mentioned should resolved the issue. Most of the time (when it doest not work) it means the cache was not cleared or the steps where not followed correctly. When you have a live store with a large number of visitors, it can sometimes be wise to outsource this to an external partner. (for an update of your webshop or apply the bugfix to your current version.) -
After my previous tutorial Adding prestashop products programmatically, we have decided to launch a new project where we will be using the PrestaShop Webservice API. The advantages of the PrestaShop Webservice API are that we can add, modify, and/or delete almost all types of data. One of the benefits of the PrestaShop Webservice API is that it also provides validation functions to prevent incorrect data from being entered into the database. For this tutorial, we have provided a "package" that you can see in action by visiting our demo shop at https://demoshop.crezzur.com/ws-api/. You can easily download this package at the bottom of this post and add it to the root directory of your webshop. This package will enable you to perform some basic operations and gain a better understanding of the PrestaShop Webservice API. The intention is to expand this package with additional functionalities based on your questions and feedback. Using this package, a developer with basic programming skills should be able to develop a page relatively easily, for example, to automatically add new products (e.g., with combinations) to their client's webshop (e.g., by using a cron job). Setup the package Unzip the ws-api.zip in the root directory of your webshop Open the config.php file and replace the YOUR_SHOP_URL and the YOUR_API_KEY with the information of your shop. Now you can try to add, edit a product, combination, ... Based on the questions you ask, we will provide a Q&A session where we will explain the questions asked. First release V0.0.1 (2023-06-13) ws-api.zip
-
Hello @hajusinuyo If you are stil looking for an answer, have a look here:
-
Prestashop Web Services (api) does not allow you to download a 'copy' of invoices. You can consult invoice details such as total paid, delivery date, ... More information can be found in the Prestashop DevDocs (Webservice Api - Order Invoices) We can build our own php page where we use the built-in functions of Prestashop to make an exact copy of the PDF invoices. For this we have to use the Prestashop classes OrderInvoice.php and PDF.php. We also want to use some of the standard functions of Prestashop such as Context for this we need to add both config/config.inc.php and init.php to our code. Next, we don't want anyone to have access to this url. Because otherwise we commit infringements against the GDPR. Your invoices contain sensitive address and payment details of all your customers. In our example we are going to use a secure_key which will allow only authorized users to access your page. To round off the whole thing, it is also interesting that we can immediately indicate from which order we want to download the invoice, for this we will use a parameter called id_order. Putting all this together we can easily add our file getPDFinvoice.php in the root of our shop, and you can then access it by surfing to https://yourshop.com/getPDFinvoice.php?secure_key=YOUR_UNIQE_CODE&id_order=WEBSHOP_ORDER_ID. getPDFinvoice.php <?php // Setup connection with config.inc.php (required for database connection, ...) include 'config/config.inc.php'; include 'init.php'; include 'classes/order/OrderInvoice.php'; include 'classes/pdf/PDF.php'; // Declare our secure_key. Remeber the secure_key provided is an example, make sure to create one by yourself. $secure_key = 'ed3fa1ce558e1cfbaa3f99403'; // controle if secure_key is correct, if the secure_key is not set our not equal the php page will stop running. if (!Tools::getValue('secure_key') || Tools::getValue('secure_key') != $secure_key) die('UNAUTHORIZED: We dont want you on this page!'); $id_order = (int)Tools::getValue('id_order'); if (!$id_order) die("Please provide and order ID!"); $order = new Order($id_order); if (!Validate::isLoadedObject($order)) die('The order invoice cannot be found within your database.'); $pdf = new PDF($order->getInvoicesCollection(), 'Invoice', Context::getContext()->smarty); $pdf->render(); Please note: This is code has been tested on a Prestashop 8.0.2 build using PHP 8.1. When using a different version, certain functions may not work or certain error messages may be displayed.
-
Crezzur.com started following (Job offer) fixing bug(s) and website optimisation
-
(Job offer) fixing bug(s) and website optimisation
Crezzur.com replied to Richard Chang's topic in Job Offers
Hello @Richard Chang, If you want we can have a look at your store to see what needs to be done. As an official Prestashop Agency we know what needs to be done to get your store back up and running smoothly. If your interested you can contact us using the PM function our via the web crezzur.com - [email protected]