Jump to content

aveeva

New Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About aveeva

  • Rank
    Newbie
  1. Here is my code : https://paiza.io/projects/SUiG5qp_wttfcrQn-0Mwew?language=php FYI -> [index.htm -> LineNo : 781 & 782] After successfully received payment response page return 404 error The form & CC-Avenue Payment Gateway Request page working good, after customer paid the response page return 404 error. How can i solve the error?
  2. I have couple of shipping methods DHL & FedEx, if selected products exits in cart show only selected shipping method, how to archive using shopping cart pricing rule or any other way to do this?
  3. I have a form, details getting from customer and calculate the grand total, here how can i pass my grand total value to ccavenue payment gateway page and getting payment form customer? code : https://www.pastiebin.com/5cdbae859bb64
  4. @requinix I have a folder with 100's images, how to find Height and width programmatically and output saved in Excel sheet? eg: folder name: img EXPECTED EXCEL SHEET: name height Width one.jpg 10 10
  5. I have folder with 100's images, how to find Height and width as Excel sheet?
  6. As i already said i am in learning stage, i did what i want in my code, additionally i want to add the feature like getting data from html form and pass to PHP function arguments ( $results = getShippingEstimate('14419','1',"IN","642001");) using ajax, here ajax i copy from working ajax (as you see from last to second Ajax actually its working, logic like if drop down field select and return th value by ajax , this is simple right ) <!-- <button id="btn_check_value">Check for value</button> --> <!-- Ajax Script --> <script> $(document).ready(function(){ $('#new').on('change',function(){ var old_val = $("#old option:selected").val(); var new_val = $("#new option:selected").val(); $.ajax({ type: "POST", url: "ajax_data.php", dataType: "text", data: { old: old_val, new: new_val}, success: function(data) { // Check the output of ajax call on firebug console // console.log(data); $('#result').html(data); $('#price').val(data); } }); }); }); </script> <script> $(document).ready(function(){ $('#new').on('change',function(){ var old_val = $("#old option:selected").val(); var new_val = $("#new option:selected").val(); $.ajax({ type: "POST", url: "ajax_ship_weight.php", dataType: "text", data: { old: old_val, new: new_val}, success: function(data) { // Check the output of ajax call on firebug console //console.log(data); $('#show').html(data); $('#shipping_weight').val(data); } }); }); }); </script> and tried to modify as per my new feature like getting value from html form and passing to php function arguments. I am sure my code for the second feature ( getting value from html form and passing to php function arguments ) Can i get help to solve my issue, I saw your last comment $_POST I did already but no luck, workout : if(isset($_POST['zip_postal_code']) && isset($_POST['country'])) { $zip_postal_code = $_POST['zip_postal_code']; $country = $_POST['country']; } //$results = getShippingEstimate('14419','1',"IN","642001"); $results = getShippingEstimate('14419','1',"$country","$zip_postal_code"); Any help, thanks.
  7. <?php ob_start(); // require_once(__DIR__ . '/app/Mage.php'); require_once('./../app/Mage.php'); umask(0); ini_set('display_errors',true); ini_set('memory_limit', '1024M'); Mage::app()->loadArea('frontend'); function getShippingEstimate($productId,$productQty,$countryId,$postcode ) { // $quote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore('default')->getId()); $quote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore('english')->getId()); $_product = Mage::getModel('catalog/product')->load($productId); $_product->getStockItem()->setUseConfigManageStock(false); $_product->getStockItem()->setManageStock(false); $quote->addProduct($_product, $productQty); $quote->getShippingAddress()->setCountryId($countryId)->setPostcode($postcode); $quote->getShippingAddress()->collectTotals(); $quote->getShippingAddress()->setCollectShippingRates(true); $quote->getShippingAddress()->collectShippingRates(); $_rates = $quote->getShippingAddress()->getShippingRatesCollection(); $shippingRates = array(); foreach ($_rates as $_rate): if($_rate->getPrice() > 0) { $shippingRates[] = array("Title" => $_rate->getMethodTitle(), "Price" => $_rate->getPrice()); } endforeach; return $shippingRates; } // echo "<pre>"; // product id, quantity, country, postcode // print_r(getShippingEstimate('14419','1',"IN","642001")); // echo "</pre>"; $results = getShippingEstimate('14419','1',"IN","642001"); // $results = getShippingEstimate('14419','1',"US","99501"); $count = -1; echo "<select>"; foreach ($results as $result): $count++; ?> <option value="<?php echo $count; ?>"> <?php echo $result["Title"]." - Rs ".$result["Price"]?> </option> <?php endforeach; echo "</select>"; ?> Above is my PHP function to return shipping cost, by using predefined value, $results = getShippingEstimate('14419','1',"IN","642001"); How can i pass my country (IN) & zip_code (642001) from the customer input form, and return the value to, <tr> <th>Shipping Cost (Rs) : </th> <td id="findata"></td> <input type="hidden" name="shipping_cost" id="shipping_cost"/> </tr> <tr> Ajax : <script> $(document).ready(function(){ $('#new').on('change',function(){ var old_val = $("#old option:selected").val(); var new_val = $("#new option:selected").val(); $.ajax({ type: "POST", // url: "ajax_ship_cost_data.php", url: "sp_cost.php", dataType: "text", data: { old: old_val, new: new_val}, success: function(data) { // Check the output of ajax call on firebug console //console.log(data); $('#findata').html(data); $('#shipping_cost').val(data); } }); }); }); </script> I am in learning stage in PHP & Ajax, i successfully return a couple of value using ajax (pls run my code) i am stuck with run time passing value to PHP function. How to do correct my code?
  8. The Business Logic is: If product is already purchased, upgrade the product I have a customer input form to get information, along with some fields which should be auto populated based on what the customer chooses. Screen Shot: https://i.stack.imgur.com/Fkyim.png Note: Price and Shipping Weight are done with Ajax, When we come to the shipping cost I am getting it from Magento, using a PHP function. form : https://paste.ofcode.org/335FVUhpBGbazQtrcPLVQUs PHP : sp_cost.php https://paste.ofcode.org/hvG2sP9TW9CEPgMMuKXNuw From the above code I am given the predefined value, $results = getShippingEstimate('14419','1',"IN","642001"); How can i get country and zipcode from the user entry and return the shipping cost?
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.