Jump to content

treiman

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Location
    Finland
  • Activity
    Other

treiman's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Since modifying the database seems to be the way to go, which of the following two approaches would you suggest: 1) Modifying the ps_orders table to accommodate the new field(s), or 2) Creating a new table with the new field(s) and the id_order as the foreign key? Would the modification of ps_orders affect future PrestaShop upgrades in any way?
  2. I am on PrestaShop 1.6.1.9. I am developing a payment module to integrate to a 3rd party payment gateway. In /controllers/front/validation.php I am authorizing the payment with the payment gateway - similar to card authorization. As per the rules of the payment gateway, I can only actually invoice the customer via the payment gateway when the goods are shipped/delivered. Therefore I have registered to the hook 'actionOrderStatusPostUpdate'. The action listener triggers as expected but I am now facing the following issue: The first API call made before the order creation - i.e. the authorization call - returns the customer's account number (for the payment gateway) and I must use this account number later on when actionOrderStatusPostUpdate triggers to invoice the purchase. However, I cannot figure out where I could store the account number and quite possible some other information such as whether the customer opted for a deferred payment or not. As far as I can see, there are no 'unused' variables in the Order or OrderPayment objects that I could use. Is there any way I could store this information in the order without overriding the Order class and modifying the database? The account number and payment type (deferred or not) must be available for two purposes: 1) To be able to call the payment gateway API to invoice the authorized purchase 2) To be able to call the payment gateway API to cancel and refund the purchase The only thing that came to my mind is the "Private Note" section in the order details, but from what I could gather that data is relate to the customer and not the order itself.
  3. Hi, I am on Prestashop 1.6. I am creating a new payment module. The payment service provider suggests that the purchase is 'authorized' with them at the time of order creation, and that the purchase is only invoiced when the goods are shipped or delivered. To comply with this, I would have to create a HTTP POST request to the external payment provider's API when changing the order state from a custom state I have created to another state (default or custom, shouldn't matter I suppose). Where should I create this functionality? The second problem I have is that the second API call made for 'invoicing' should use some of the information used in the first API call that was used to 'authorize' (essentially a credit check) a payment. However, that information does not exist anymore after the order is created: the information used for the first API all exists in my validation.php front controller, but if I have understood correctly I can only add an order reference as an 'additional' variable to validateOrder(). Now, I suppose I could circumvent this my somehow encoding the information required in the latter API call ('invoice') into the order reference, but this does not seem like a clean solution. Is there some easy and/or clean way to store additional information in objOrder for later use when creating the order? For clarity, my current flow looks like this: 1. Select payment method at hookPayment by entering one's social security number (used by the 3rd party API) and click the payment method 2. payment.php front controller displays payment.tpl from views/templates/front; this page contains a form that is used to send the 'authorization' request with the user's information and the total_paid to the 3rd party 3. The form from payment.tpl (front) is handled (form action) by validation.php front controller, which validates and creates the order. The order state is set to one of my custom states ('invoice/loan authorized'). 4. -- THIS IS WHAT I AM MISSING -- Next the shop should trigger the second API call ('invoice') to the 3rd party API when the order status is changed to, say, 'Delivered'; the API call requires information such as the customer social security number, the purchased items, along with some other information - some of which can be fetched from the Order object and some of which cannot.
  4. Hello, I need to configure my server to support IMAP and/or POP3 and my only question is if any configuration made to postfix, dovecot/courier would somehow affect my Prestashop installation or is it completely independent from these underlying components? My shop is configured to use the PHP mail() function and no manual configurations have been added, so all the communication at the moment is done using the web form to give feedback or ask for information. If Prestashop integrates with some of these services, is it limited to postfix and may I thus freely reset my courier configuration or even replace it with dovecot without affecting the functionality of my Prestashop instance?
  5. Hello, My initial problem with Prestashop was that when modifying categories (editing, deleting or creating new ones) the action took a fair amount of time and resulted in an Internal Server Error (result code 500), and this log message seemed to appear in httpd error_log: [warn] mod_fcgid: process 15853 graceful kill fail, sending SIGKILL It was no always like this. I have a fair amount of categories now, and the problem with the editing has been of late. As a solution, I tried modifying the fcgid configuration file with some post I found on the Internet. The fcgid conf file now includes the following lines: LoadModule fcgid_module modules/mod_fcgid.so <IfModule mod_fcgid.c> <IfModule !mod_fastcgi.c> AddHandler fcgid-script fcg fcgi fpl </IfModule> FcgidIPCDir /var/run/mod_fcgid/sock FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm FcgidIdleTimeout 3600 FcgidProcessLifeTime 30 FcgidMaxProcesses 20 FcgidMaxProcessesPerClass 8 #FcgidMinProcessesPerClass 4 FcgidConnectTimeout 30 FcgidIOTimeout 1800 FcgidInitialEnv RAILS_ENV production FcgidIdleScanInterval 480 FcgidSpawnScoreUpLimit 10 FcgidSpawnScore 1 FcgidTerminationScore 2 FcgidMaxRequestLen 1073741824 </IfModule> After this change and some larger innodb_buffer_pool_size (85M now), I am having more problems. The modification of categories no longer results in result code 500, though the actions still take a very long time (30 sec to 1 min). However, I am now seeing this in httpd error log: [sat Mar 29 20:44:36 2014] [error] (12)Cannot allocate memory: mod_fcgid: can't run /var/www/cgi-bin/cgi_wrapper/cgi_wrapper [sat Mar 29 20:44:36 2014] [warn] (12)Cannot allocate memory: mod_fcgid: spawn process /var/www/cgi-bin/cgi_wrapper/cgi_wrapper error [sat Mar 29 20:44:37 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process [sat Mar 29 20:44:47 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process [sat Mar 29 20:44:57 2014] [notice] child pid 3040 exit signal Segmentation fault (11) This morning the server had went totally unresponsive, with only the main page being reachable via HTTP and not HTTPS. I could not even get in via SSH. Lucklily I was able to reboot the server from the service provider's management GUI. What I would like to know is how to really configure everything (apache, mysql, fcgid, php, etc.) for me to make my Prestashop installation work without hiccups. At the moment the shop has been up and running all day, but I fear that I might find it down again when I wake up tomorrow. I've attached here as a file some information I thought that would be of use to anyone trying to help -- httpd configuration items, my.cnf contents, error log messages, cpuinfo, etc. What's not there is that I have only 512 MB of RAM at my disposal, nor do I actually know how reliable that cpuinfo is. Would seem rather silly to have all that processing power and only 512 MB of memory... info.txt
  6. Hello, I have the following problem: I have a module called Advanced Top Menu installed in my shop. The problem is that the <div> (my guess) will stay on top of the ajax shopping cart when the cart is expanded on mouse hover. I have temporarily circumvented the problem by just making the top menu box not so wide, ending before the shopping cart begins. This however makes the top menu look bad when the shopping cart is not expanded. Attached here is a picture of the situation with the shopping cart expanded. My wish is to get that cart on the very top. I have not made any modifications to the shopping cart code-wise.
×
×
  • Create New...