Jump to content

auroncaos

New Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by auroncaos

  1. I have the 1.6 version, with a custome theme (ps_glori) I have 2 kind of shipping method: pay for delivery at home (9.5 dollars) no pay for getting in the store (0.00 dollars) add to future orders then in the hook payments module I have: bankwire (module) paypal (module) pay later (module "custome payment method) I need pay later to appear only for "add to future orders" and bankwire and paypal for the other 2 kinds of carrier. I guess I need to edit displayPayment.tpl or ps_checkout.php ? Thanks for your help
  2. hello there, sorry for reopen this old topics, can anyone give me a suggestion to create this function on 1.6 prestashop? I need to "hide" some payments methods if a specific carrier is selected.
  3. hello there, sorry for reopen this old topics, can anyone give me a suggestion to create this function on 1.6 prestashop? I need to "hide" some payments methods if a specific carrier is selected.
  4. No one have found a solution? it's a big deal, because a shop need to have a checkout systems with high security...
  5. Sure, first of all thanks for your help I installed for paypal connection PrestaShop Checkout v6.3.3.1 - by PrestaShop and Account PrestaShop v5.4.6 - by PrestaShop (needed for the first one to work) Account prestashop ask me an account to link, but like I said before, the website https://www.scrapiteasy.com is already connected and I can't find the correct mail. The strange things about it, I installed the addons two month ago and everything works fine, a week ago I noticed paypal wasn't an option anymore on checkouts and the addons was no configured, then I got this problem.
  6. I installed an addons for bulk action ( called ba_importer v 1.1.24), I upload an excel files with my data and create a group of products. I can set the categories' tree or manually add ID of main categories and associated; I tried with no luck to use the tree features (like Home/Products/etc ) and so I use all the ID of main category and all the associated. The result is a product with the correct categories setted, but with no specific price from the customer group linked to a category. I tried to edit a single product, remove all categories and set it one by one (set one, save, set one, save etc.) and then the specific price from the group linked to a categories appear to the product. Someone have a similiar issues and find a better solution? I'm thinking about make a personal php page that read and excel files and setting all the information about the product but I'm scaried to face the same problem with the specific price.
  7. try : where $order is the order object from prestashop then $cart = new Cart($order->id_cart); $product_list = $cart->getProducts(); $order_detail = new OrderDetail(null, null, null); $order_detail->createList($order, $cart, 1, $product_list, 0, true, 0); $order_detail_list[] = $order_detail;
  8. ps: I already try to use Order_cart_rule too, in the same way, I can't find the function to "use" and "decrease" the voucher 😞
  9. Hello there, I have a problem with a "cart_rule" already created, I add it on a Cart with some product and on the cart it show correctly. I use: $cart ->addCartRule($cart_rule->id); then I save the cart and it's show all right. I create an order $order = new Order(); $product_list = $cart->getProducts(); $order->id_carrier = $id_carrier; //my data, working fine $order->id_customer = $id_customer; $order->id_address_invoice = (int)$id_address; $order->id_address_delivery = (int)$id_address; $order->id_currency = 2; $order->id_lang = 2; $order->id_cart = $id_cart; $order->reference = $my_reference; $order->id_shop = 1; $order->id_shop_group = 1; $order->secure_key = $customer->secure_key; $order->payment = "Bank wire"; //change if need $order->module = "bankwire"; //change if need $order->recyclable = 0; $order->gift = (int)0; $order->gift_message = ""; $order->mobile_theme = 0; $order->conversion_rate =1.000000; -- I set the amount to pay, discount, etc. then I execute $result = $order->add(); // Insert new Order detail list using cart for the current order $order_detail = new OrderDetail(null, null, null); $order_detail->createList($order, $cart, 1, $product_list, 0, true, 0); $order_detail_list[] = $order_detail; // I set manually my order_detail //then $history = new OrderHistory(); $history->id_order = (int)$order->id; $history->changeIdOrderState((int)10, $order->id); $history->save(); $order_carrier = new OrderCarrier(); $order_carrier->id_order = (int)$order->id; $order_carrier->id_carrier = (int)$id_carrier; $order_carrier->weight = (float)$order->getTotalWeight(); $order_carrier->shipping_cost_tax_excl = (float)$order->total_shipping_tax_excl; $order_carrier->shipping_cost_tax_incl = (float)$order->total_shipping_tax_incl; $order_carrier->add(); It's works just fine, i can write the amount I want etc... I have only a problem, even if the cart rule (a discount) is applied at the cart, when I change the state of the order in payment accepted, the cart_rules saved don't change, the amount of the discount don't decrease, like it was infinite... ANy suggestion? thanks 🙂
  10. any solutions? I have the same problem with bankwire instead, in some case when I create manually an order, I have the same problem.
  11. Hello there, I have a list of control / function for add by php a "new" product (not listed) in a new cart if cart not already exists, otherwise just add the product in the current cart of the selected users with $cart->updateQty(1, $ID_PRODUCT); I have included the following: require_once('config/config.inc.php'); require_once('init.php'); Now I need a function for add a product in a actual order (after a check if the order is still avaiable for editing, like "waiting for payment" etc) No problem on the check, but in the adding, there is some function I can use? Somebody can help me with some hint? for now I have this: //for example, my order have id 10, so I use 10 $order= new Order(10); $id_cart = $order->id_cart; $cart = new Cart($id_cart); //I have an ID product to add called $id_product $cart -> updateQty(1,$id_product); $cart->update(); $cart->save(); $id_carrier = $order->id_carrier; $order->total_products = (float)$cart->getOrderTotal(false, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier); $order->total_products_wt = (float)$cart->getOrderTotal(true, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier); $order->total_discounts_tax_excl = (float)abs($cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier)); $order->total_discounts_tax_incl = (float)abs($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier)); $order->total_discounts = $order->total_discounts_tax_incl; $order->total_shipping_tax_excl = (float)$cart->getPackageShippingCost((int)$id_carrier, false, null, $order->product_list); $order->total_shipping_tax_incl = (float)$cart->getPackageShippingCost((int)$id_carrier, true, null, $order->product_list); $order->total_shipping = $order->total_shipping_tax_incl; $order->total_wrapping_tax_excl = (float)abs($cart->getOrderTotal(false, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier)); $order->total_wrapping_tax_incl = (float)abs($cart->getOrderTotal(true, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier)); $order->total_wrapping = $order->total_wrapping_tax_incl; $order->total_paid_tax_excl = (float)Tools::ps_round((float)$cart->getOrderTotal(false, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_); $order->total_paid_tax_incl = (float)Tools::ps_round((float)$cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_); $order->total_paid = $order->total_paid_tax_incl; $order->round_mode = Configuration::get('PS_PRICE_ROUND_MODE'); $order->round_type = Configuration::get('PS_ROUND_TYPE'); $order->update(); $order->save(); this give an updated cart of references, an updated total price and so on, but the "internal cart" aka the order details are not updated. i tried several ways but I can't find anything. I got the order detail at least (always with 10 as ID) $list= OrderDetail::getList(10);
×
×
  • Create New...