Jump to content

kassimi.hn

Members
  • Posts

    55
  • Joined

  • Last visited

1 Follower

Profile Information

  • Location
    casablanca
  • First Name
    hanane
  • Last Name
    kassimi

kassimi.hn's Achievements

Newbie

Newbie (1/14)

0

Reputation

2

Community Answers

  1. I'm having the same issue, did you find a solution ??
  2. I'm facing the same issue. I found a tutorial to redirect customer after login during checkout but I can't make it work. What I had, by default is redirection to home page when I added the script ,after being logged it goes to my account. What I want to do is to redirect user to the first step(order).what do I need to change. here is the link : https://www.arnaud-merigeau.fr/tuto-prestashop-rediriger-apres-login-vers-etape-suivante/ Thanks for helping me and I'm sorry for my english
  3. I'm facing the same issue, I have installed the nemo's module but I don't know what I should do after this installation, what files I should edit ? is there any configuration that I have to do ?? Thanks for helping me
  4. I'm searching for a solution too for that, does any one know how to do that ?
  5. this solution ends with error : table '-------.ps_orders' doesn't exist, I don't know why it takes the default prefix of table instead of the one that I specify
  6. I'm newbie with prestashop webservice, I'm trying to save orders in prestashop database but i'm getting this error : table ps_orders doesn't exist, which is normal because prefix of my tables is different than ps_ : here is my code : define('DEBUG', true); define('PS_SHOP_PATH', 'http://localhost/prestashop'); define('PS_WS_AUTH_KEY', 'CQP84L4R3GB6IV99E5WSP4JPSWXDYE1R'); require_once('./PSWebServiceLibrary.php'); try{ $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $xml = $webService->get( array('url' => PS_SHOP_PATH.'/api/carts?schema=blank') ); $resources = $xml->children()->children(); $id_currency = 3; $id_lang = 2; $id_product = 2571; // $attribute_product = $id_address = 8; $qte_product = 1; $id_customer = 3; $id_carrier = 3; $date_now = date('Y-m-d H:i:s'); $name_product = 'produit 111 '; // $reference_product = ; $price_product = 320; $tax_inclu_product = 320; $tax_excl_product = 320; $order_module = 'cashondelivery'; $order_payment = 'Cash on delivery (COD)'; $total_paid = 355; $total_paid_real = 355; $total_products = $price_product; $total_products_wt = $price_product; $id_status = 5; // status de la commande : livré, en cours $total_discounts =0; $total_discounts_tax_incl = $total_discounts; $total_discounts_tax_excl = $total_discounts; $total_paid_tax_incl = 355; $total_paid_tax_excl = 355; $total_shipping = 35 ; //frais selon la ville de livraison $total_shipping_tax_incl = $total_shipping; $total_shipping_tax_excl = $total_shipping; $xml->cart->id_currency = $id_currency; $xml->cart->id_lang = $id_lang; $xml->cart->associations->cart_rows->cart_row[0]->id_product = $id_product; // $xml->cart->associations->cart_rows->cart_row[0]->id_product_attribute = $attribute_product; $xml->cart->associations->cart_rows->cart_row[0]->id_address_delivery = $id_address; $xml->cart->associations->cart_rows->cart_row[0]->quantity = $qte_product; // Others $xml->cart->id_address_delivery = $id_address; $xml->cart->id_address_invoice = $id_address; $xml->cart->id_customer = $id_customer; $xml->cart->id_carrier = $id_carrier; $xml->cart->date_add = $date_now; $xml->cart->date_upd = $date_now; // Adding the new customer's cart $opt = array( 'resource' => 'carts' ); $opt['postXml'] = $xml->asXML(); $xml = $webService->add( $opt ); $id_cart = $xml->cart->id; // ORDER $xml = $webService->get(array('url' => PS_SHOP_PATH .'/api/orders/?schema=blank')); // Adding dinamic and required fields // Required $xml->order->id_address_delivery = $id_address; // Customer address $xml->order->id_address_invoice = $id_address; $xml->order->id_cart = $id_cart; $xml->order->id_currency = $id_currency; $xml->order->id_lang = $id_lang; $xml->order->id_customer = $id_customer; $xml->order->id_carrier = $id_carrier; $xml->order->module = $order_module; $xml->order->payment = $order_payment; $xml->order->total_paid = $total_paid; $xml->order->total_paid_real = $total_paid_real; $xml->order->total_products = $total_products; $xml->order->total_products_wt = $total_products_wt; $xml->order->conversion_rate = 1; // Others $xml->order->valid = 1; $xml->order->current_state = 1; $xml->order->total_discounts = $total_discounts; $xml->order->total_discounts_tax_incl = $total_discounts_tax_incl; $xml->order->total_discounts_tax_excl = $total_discounts_tax_excl; $xml->order->total_paid_tax_incl = $total_paid_tax_incl; $xml->order->total_paid_tax_excl = $total_paid_tax_excl; $xml->order->total_shipping = $total_shipping; $xml->order->total_shipping_tax_incl = $total_shipping_tax_incl; $xml->order->total_shipping_tax_excl = $total_shipping_tax_excl; // Order Row. Required $xml->order->associations->order_rows->order_row[0]->product_id = $id_product; //$xml->order->associations->order_rows->order_row[0]->product_attribute_id = $attribute_product; $xml->order->associations->order_rows->order_row[0]->product_quantity = $qte_product; // Order Row. Others $xml->order->associations->order_rows->order_row[0]->product_name = $name_product; // $xml->order->associations->order_rows->order_row[0]->product_reference = $reference_produc; $xml->order->associations->order_rows->order_row[0]->product_price = $price_product; $xml->order->associations->order_rows->order_row[0]->unit_price_tax_incl = $tax_inclu_product; $xml->order->associations->order_rows->order_row[0]->unit_price_tax_excl = $tax_excl_product; // Creating the order $opt = array( 'resource' => 'orders' ); $opt['postXml'] = $xml->asXML(); $xml = $webService->add( $opt ); $id_order = $xml->order->id; echo "Customer 1 : ".$id_customer." address: ".$id_address." cart: ".$id_cart." Order: .".$id_order; } catch (PrestaShopWebserviceException $e) { // Here we are dealing with errors $trace = $e->getTrace(); if ($trace[0]['args'][0] == 404) echo 'Bad ID'; else if ($trace[0]['args'][0] == 401) echo 'Bad auth key'; else echo 'Other error<br />'.$e->getMessage(); }
  7. Hi, I have an ecommerce website developped with Wordpress and I'm trying to move it to Prestashop, I succedded to import products, declinaison, customers... now I'm stuck with importing orders . there is no option in Back office to do that (like importing products...) . I faced a lot of problems : knowing that I have a CSV file containing : customer Email , Paiement method, total command, product name, quantity, product price ,shipping method, I tried to import orders using sql queries but I find difficulty to detect all tables that I have to change . I was wondering if is possible to achieve what I want using prestashop web service. thank you,
  8. thank you rocky , pb solved for me I have one more question how can I have an overlay with my fancybox and how can I give the possibility to close the fancybox if user click on overlay , I mean it s not necessary to click on close button I tried this but it doesn't work : $("#dialog").fancybox({ 'width':800, 'padding':0, 'height':375, 'autoSize' : false, 'overlayShow' : true })
  9. Hi ! I'm having an issue with using jqzoom on product pages, well it works good on desktop where I can zoom my product images without any problem , but when I try to do the same thing on mobile it doesn't work : I did some research on the net where I found that I have to delete this two lines in global.js , which I did but same result : var viewport = document.querySelector('meta[name=viewport]'); viewport.setAttribute('content', 'initial-scale=1.0,maximum-scale=1.0,user-scalable=0,width=device-width,height=device-height'); Can you please Help me to fix this or just to disable jqzoom on mobile device if there is no solution for my issue I'm using prestashop 1.6
  10. Salut, J'ai le même pb avez-vous trouvé une solution pour ce problème ? Merci d'avance
×
×
  • Create New...