Jump to content

cyberdoc

Members
  • Posts

    67
  • Joined

  • Last visited

1 Follower

Profile Information

  • Activity
    Freelancer

Recent Profile Visitors

3,230,794 profile views

cyberdoc's Achievements

Newbie

Newbie (1/14)

2

Reputation

1

Community Answers

  1. ive upgraded my prestashop but after that preview images are not showing up for many of the products.. i noticed that the file tm_home_default is missing for all of these.. on trying to generate these files using regenerate thumbnails i get "Original image is corrupt (public_html/img/p/8/8/8/5/8885.jpg) for product ID 4701 " error Is there any way how i can fix this... bcoz there are more than 1000 products and it'll be very difficult to do anything manually..
  2. ive upgraded my prestashop but after that preview images are not showing up for many of the products.. i noticed that the file tm_home_default is missing for all of these.. on trying to generate these files using regenerate thumbnails i get "Original image is corrupt (public_html/img/p/8/8/8/5/8885.jpg) for product ID 4701 " error Is there any way how i can fix this... bcoz there are more than 1000 products and it'll be very difficult to do anything manually..
  3. Hi guys, im trying to develop a custom payment gateway module for bitcoin payments on presta. The process goes as under. ive listed it as a gateway. when the user chooses it, i redirect him to a page on my gateway server where he's shown a barcode. He scans the barcode and make the bitcoin payment. Then ive another page on my server which tells presta the status of the user activitiy. (its called listening.aspx) and it returns a JSON response (PAID: if user has paid/EXPIRED: Timeout/ AWAITING : waiting for user activity) So what i need is after i redirect user to my server for showing barcode for payment, my prestashop should check this status every 10 seconds and if it has changed to paid or expired update the order respectively.. I've come up with the following code for this, (am a newbie and excuse me if its lame...) Hope to get some help soon on how to proceed. $order_id = $this->module->currentOrder; if (!$order_id) { Tools::redirect($this->context->link->getPageLink('history'), true); } $price = (float)$cart->getOrderTotal(true, Cart::BOTH); //Get url of payment and listening page for the transaction $json = file_get_contents('http://old.kbourbaki.com/xapiserverprestashop.aspx?servicio=rfp&keyapi=abc1234efg&importe=248,64&orden=uvw234xyz'); $obj = json_decode($json); $paypage = $obj->paymentpage; Tools::redirect($paypage); while($endloop==0) // till a response is received { $json = file_get_contents('http://old.kbourbaki.com/xlisteningpageprestashop.aspx?yyyyyyy'); $obj = json_decode($json); $result=$obj->response; //response of server listening page echo($result); if ($result=='paid') { return 1; // paid, update presta $end=1; }elseif ($result=='expired' ) { return -1; // timeout, redirect to home $end=1; Tools::redirect('http://www.ahmspro.com/presta'); } else{ return 0; // awaiting response sleep(10); // wait for 10 seconds } } any help would be highly appreciated
  4. Hi guys, am new here and excuse me if this is too basic. Basically what i want is 2 combinations for a product. ill explain with an example. Ive a mobile hardware store. So it has a product(Ex. iPhone 6), with an attribute country (US, UK etc) to select which country the user belongs and depending on the country there are operators to be available(2nd attribute- Vodafone for US, ATT & Verizon for UK, Airtel & Idea for India). How do i make sure, the user sees only the respective operators when he selects a particular country from the attribute dropdown... Waiting for reply, Thanks in advance
  5. How do i determine if the user belings to a particular customer group and then only show him a module block??
  6. Hi Paul, thanks for replying. yes i did see that module bt actually i want some customizations as mentioned so i'm more into favour of customizing the official wishlist block, instead of buying this and then again modifying it.
  7. I guys i'll explain the functionality i'm trying to achieve. I will have two types of users on my site. The students and parents. I want that if the user is a student, he creates a wishlist (using the wishlist module) and send to parent etc. Now if the user is a parent , he has a option to select a pre-created wishlist directly(Books for Grade 5) etc.. Any suggestions on how to proceed would be great.. Also one question does the wishlist module of presta have the ability to autodetect once a wishlist item is bought??
  8. trying via phpmyadmin na? did it that works na i said above..
  9. hi thanks for ur reply. i tried the directly phpmyadmin way already and it works nicely. its only when im using these variables. and the stramge this is if i echo sub_total before executing the sql code , it also outputs proper value just in the statement its not being passed. cant figure whats wrong in the syntax..
  10. Hi guys, sorry for such a silly php query but tried too much and not working. Am missing something silly. $sub_total = $result['textarea']; $newpro=$result['mainid']; echo ($sub_total); $result = Db::getInstance()->Execute('UPDATE `'. _DB_PREFIX_ .'product` SET `price` = ' .$sub_total. ' WHERE `id_product` = 9'); i use this query to update the product table. now the echo sub_total gives the correct value(10) but the sql is not run with the error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `id_product` = 9' at line 1 UPDATE `ps_product` SET `price` = WHERE `id_product` = 9 now from this it seems no values is being passed for sub_total but how and why this could happen
  11. Hi, guys can any1 guide me on the hook i need to use to run a piece of code everytime any modifications in the products of cart is done(addition/deletion of product/increase of quantitiy). i tried hookactionCartSave but it seems thats not the correct one. Im using 1.6
  12. i think a way would be to write a module, which generates a form with a textbox for comment on each product. and hook it to displayshoppingcart to show it. then when the user enters comments, save them to the custom field you create in the orders table.. just one way to go..
×
×
  • Create New...