Jump to content

telnett

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by telnett

  1. Please ignore this post, the solution was to use a different state which I tried but failed at first (because of file write permissions), that made me think that solution was not effective. Here is what worked great for me: $this->module->validateOrder((int)$this->context->cart->id,17,null,"my module",null,[],null,false,$customer->secure_key); 17 - my custom order state which says "waiting for payment".
  2. Hi guys, I'm having some hard time trying to validate order without adding a transaction. Looks like I'm not getting the whole procedure right and my orders end up with bad payment (0 EUR) when I execute this before sending a customer out to the payment gateway: $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), null, "my module", null, array(), null, false, $customer->secure_key); What I'm trying to achieve here is a pending order with no payments received which will then be validated by callback from a payment gateway so could you please shed some light on this.
  3. Thank you for your quick and accurate response! With this, I ended up having "mod_fcgid: stderr: PHP Fatal error: Class 'ProductExtraContent' not found ..." written to my error_log. Obviously I was still missing something, but since you got me on the right track, here is what worked for me: public function hookdisplayProductExtraContent($params) { $array = array(); $array[] = (new PrestaShop\PrestaShop\Core\Product\ProductExtraContent()) ->setTitle('tittle') ->setContent('content'); return $array; } Hope this thread will be useful for future learners!
  4. So, with displayProductTab and displayProductTabContent removed, how do we go about squeezing in new tabs on the product vew page?
  5. Hello and thank you for your response! I could not find a good way to achieve this so I just edited address-form.tpl, but I was trying to avoid that method so I asked here. {if $field['name']|strstr:"id_country"} {continue} {/if} {if $field['name']|strstr:"address2"} {continue} {/if} {if $field['name']|strstr:"vat_number"} {continue} {/if} {if $field['name']|strstr:"company"} {continue} {/if} I understand using overrides would be right way to do this but I'm not familiar with overrides. Is there any basic tutorial for that? Also, additional notes field is removed from the order procedure in 1.7 so I will need to find a way to put that in.
  6. I need to add/remove some fields in the address form, what would be the best approach? Is there a hook that I could make use of for this matter?
  7. How come this thread is marked as solved? It is definitely not solved. There are no captions and we need them.
  8. Am i missing something or may the client only atempt payment once for each order? If the buyer is reaching payment gateway but never pays, the order just hangs there with "waiting for payment" status and the buyer cannot attempt the payment again. Is there a reason for such design or can we improve user's experience by allowing to try again with the payment somehow ?
  9. Thank you for your input on this. The thing is, that I don't think that their goal is to login as user. What I believe they are doing is trying out some nasty exploit. That is what these bots usually do. It might be some remote file inclusion or mysql query execution and that is what scares me most.
  10. Yes, It's my own private server so I can ban the IP but it is useless to chase them since it's nearly never the same IP twice. I'm trying to come up with a method to detect such bots automatically. Looks like they are not loading any images. They only have very few interactions: Index page -> POST something to login form? -> gone No image requests recorded. Looks like one way to distinguish them.
  11. Anyone else cares about safety? No? Ok....
  12. Hello, I can see bots trying to bruteforce (very slowly) the front office login form: 91.200.12.95 - - [25/Nov/2014:03:22:47 +0200] "POST /login HTTP/1.0" 200 51541 "http://XXXXXXXXXX/login?back=my-account" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36" 91.200.12.95 - - [25/Nov/2014:04:43:24 +0200] "POST /login HTTP/1.0" 200 51471 "http://XXXXXXXXXX/login?back=my-account" "Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0" 91.200.12.95 - - [25/Nov/2014:05:13:35 +0200] "POST /login HTTP/1.0" 200 51473 "http://XXXXXXXXXX/login?back=my-account" "Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.17" 91.200.12.95 - - [25/Nov/2014:09:30:12 +0200] "POST /login HTTP/1.0" 200 51605 "http://XXXXXXXXXX/login?back=my-account" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 YaBrowser/14.7.1916.15705 Safari/537.36" 91.200.12.95 - - [25/Nov/2014:11:39:24 +0200] "POST /login HTTP/1.0" 200 51581 "http://XXXXXXXXXX/login?back=my-account" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 OPR/23.0.1522.77" It's a bot for sure because I know my clients and thats not one of them. Also, you should notice the user agent rotation on the log excerpt. Do you have simmilar activity on your apache logs? Do we have any cure for that?
  13. Hello everyone! The past few days I was stugling to get Google Analytics module (ganalytics) working on my shop. I will share my experience hoping that some of you might find it useful. FYI: Testing on PrestaShop 1.5.2; Freshly installed; No custizations apart from these two additional modules: 1. Ganalytics 1.8.2; 2. prestashop-1.5.x-paysera-1.6-2014-01-02 (https://support.paysera.com/index.php?/Knowledgebase/Article/View/93/37/prestashop) So I tested order tracking after setting up ganalytics as instructed for a few days with no luck, these pages never appeared on google analytics: order/step0.html (required) authentication.php (required) order/step1.html (required) order/step2.html (required) order/step3.html (required) Started to google arround and found a lot of people complaining about it. Makes me wonder does this module actually work for any of you? Either way, with help of google analytics debugger for chrome I was able to conclude that pageview beacons are not sent while going through the order procedure. Most of the related topics on this forum lead nowhere, but regardless the fact, that I don't speak French, I found a fix for most of this issue here: http://www.prestashop.com/forums/topic/362434-objectif-google-analytics-ps-16/?p=1843162 The post above seem to address the issue accurately. This is my small victory. Now was able to see some order step data on my analytics. To be honest, the French code does not entirely worked for me since it caused "Order-History" to be marked as step0.html, which is wrong. So I made a small chage: Wrapped the code with additional IF to exclude order-history. This was my progress so far when I stated this thread. What I was still missing was: authentication.php - Never appears order-confirmation.php - Never appears The code above is suppose to send pageview on order-confirmation.php when the client lands on the page with name 'order-confirmation'. Analyzing the actual apache log I can see this matching log line: "GET /order-confirmation?id_cart=............. So it seems that: 1. The client comes back from the payment gateway. 2. Hits /module/mokejimai/validation 3. Gets redirected to the /order-confirmation 4. lands on /order-history So why isn't the pageview beacon sent? Well, as far as I understand, the only page with header is /order-history. Correct me if I'm wrong, but none of the previous 3 pages have header.tpl loaded so no analytics code there. So I came up with this solution: Found PHP function to generate pageview for google analytics. http://stackoverflow.com/questions/14048998/use-google-analytics-to-track-usage-of-php-api Found the php file for the first controler where the client lands after the payment: /modules/mokejimai/controllers/front/validation.php (my payment gateway module) Added the code to generate the pageview: AnalyticsDoHit("UA-XXXXXXXX-X", "order-confirmation.php", "order-confirmation.php"); Success: If you have any questions, I will be happy to help you out.
  14. ok, well this one did not worked either, but you got me back on the track. I have just pasted a bunch of html from my list view page and now I can get some distorted stuff to fly roughly towards the cart so I believe I'll work my way throught this by cleaning that html out tag by tag. Thank you for your attention and quick response, I appreciate it! EDIT: Adding the code that works for me My solution: <img class="add_to_cart_image" src='/image_url.jpg'> <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_45" href="/cart?add=&id_product=45" title="Add to Cart">Add to Cart</a>
  15. I only had this basic html, no divs or images yet. Something like this? <div><img src='some_image.jpg'><a onclick="ajaxCart.add(product_id=45, null, true, null, quantity=1, null);">Add to cart</a></div> Well, I must be doing it wrong because it didn't helped.
  16. Hello, I'm using this advice to add items to the cart directly from CMS. http://www.prestashop.com/forums/topic/173355-add-to-cart-in-a-cms-page/ The script is working correctly, however, there is no animation. I could not find any related topcs here nor any hints on how to force animation when adding to cart this way.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More