Jump to content

ArsalanAnsari

Members
  • Posts

    72
  • Joined

  • Last visited

2 Followers

Profile Information

  • Location
    Pakistan
  • Activity
    Freelancer

Recent Profile Visitors

955 profile views

ArsalanAnsari's Achievements

  1. Hi, Is there any module exist to take 50% order payment for backorders. Please share url if so. thanks in advance.
  2. @kos2 can you please share the solution?
  3. hi, i know this post is old but @prabhakaran3492 can you please let me know how did you mange to get png images ??
  4. Hi, I am developing a carrier module and using API call to get carrier cost from Bigpost Shipping, i am getting results from bigpost using api call but the problem is request taking too much time to get results, my code's are public function carrierCost($id_address){ $cart = Context::getContext()->cart; $products = $cart->getProducts(true); //print_r($products); foreach($products as $key => $product){ $products_array[] = array( 'ItemType' => 0, 'Description' => $products[$key]['name'], 'Quantity' => $products[$key]['cart_quantity'], 'Height' => $products[$key]['height'], 'Width' => $products[$key]['width'], 'Length' => $products[$key]['depth'], 'Weight' => 10, 'Consolidatable' => true); } $address = new Address($id_address); $url = "https://www.bigpost.com.au/api/getquote"; $ch = curl_init(); $headers = array( 'Content-Type: application/json', 'AccessToken: xxxxxxxxxxxxxxxxxxxx' ); $data = array ( 'JobType' => 2, 'BuyerIsBusiness' => true, 'BuyerHasForklift' => true, 'ReturnAuthorityToLeaveOptions' => true, 'JobDate' => '2020-08-14', 'DepotId' => 0, 'PickupLocation' => array ( 'Name' => 'xxxx', 'Address' => 'xxxx', 'AddressLineTwo' => 'string', 'LocalityId' => 0, 'Locality' => array ( 'Id' => 0, 'Suburb' => 'xxxx', 'Postcode' => 'xxxx', 'State' => 'WA', ), ), 'BuyerLocation' => array ( 'Name' => $address->firstname." ".$address->lstname, 'Address' => $address->address1, 'AddressLineTwo' => 'string', 'LocalityId' => 0, 'Locality' => array ( 'Id' => 0, 'Suburb' => $address->city, 'Postcode' => $address->postcode, 'State' => 'WA', ), ), 'Items' => $products_array, ); $data_string = json_encode($data); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, True); $server_output = curl_exec($ch); $_error = curl_error($ch); curl_close($ch); if ($_error == '') { return json_decode($server_output, true); } else { return FALSE; } } and i am using this function inside public function getOrderShippingCost($params, $shipping_cost) but that taking too much time if i open cart page, increase qty in cart, change address etc. what should i do, please help and thanks in advance. Prestashop 1.6.1.13
  5. oh man you are good, i have solved the problem, it was in override folder. thanks mate.
  6. hi, i am facing that same issue. i can't see your solution. will you please post details. which line you removed.
  7. Hi, I want to get records from ps_stock_available without default "0" attribute if product has attribute. As you know in ps_stock_available table show's default attribute as 0 for example ... id_product id_product_attribute 1 0 1 12 1 13 1 14 2 0 3 0 4 0 4 1 4 2 4 4 What i want is to get records by mysql query such as... id_product id_product_attribute 1 12 1 13 1 14 2 0 3 0 4 1 4 2 4 4 Let me know if someone can help.
  8. Hi, I wish to generate favorite product list for my customers for example 1. select customer 2. select product 3. min qty* 4. max qty* 5. click save * i want to modify favorite product table with min and max qty column. If is it possible by customize favorite product module then how can i do this? Thanks in advance.
  9. Hi, I have two link "link1" and "link2" they both targeting one page has two form for example form "form1" and "form2" what i want is when i click on "link1" and when page loads targeting "form1" should show and "form2" should hide and same form "link2". Hope you understand. thanks in advance. Arsalan
  10. In orderopccontroller.php line# 586 /* Check minimal amount */ $currency = Currency::getCurrency((int)$this->context->cart->id_currency); $minimal_purchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); $groups = Customer::getGroupsStatic((int)$this->context->cart->id_customer); $whgroup = false; foreach ($groups as $g) { if($g == 4) $whgroup = true; } if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimal_purchase && $whgroup) { return '<p class="warning">'.sprintf( Tools::displayError('A minimum purchase total of %1s (tax excl.) is required to validate your order, current purchase total is %2s (tax excl.).'), Tools::displayPrice($minimal_purchase, $currency), Tools::displayPrice($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS), $currency) ).'</p>'; }
  11. Hi, Actually i am trying to create a backoffice module and according to my need's i want if we modify additional_shipping_cost and click save or save and stay button then how do i know that additional_shipping_cost has updated? because i wish to execute that module only if additional_shipping_cost goes update. Hope that its clear. Thanks in advance.
  12. Hi, I created a cart_rule and i wish that if customer didn't placed any order before then he/she can avail that voucher other wise don't. i create a new customer group and add that group in cart rule group restriction and force new customers to be in that new customer group. Hope its clear. Thanks in advance.
  13. from your backend go to 'Advanced Paremeters > multistore' and change the shop url from www.yourdomain.com to yourdomain.com then regenerate your .htaccess file from 'Preference > SEO & Url' and checked 'friendly url' to no and hit save and revert it back to yes and hit save again (that process will regenerate your .htaccess file) Let me know the result.
  14. do you know your nameserver of your hosting account? your name server would be something like ns1.yourdomain.com ns2.yourdomain.com or might be different. what type of hosting you are usign shared of vps hosting? are you sure about the IP you added at @ entry?
×
×
  • Create New...