Jump to content

jka

Member
  • Posts

    244
  • Joined

  • Last visited

Everything posted by jka

  1. jka

    Tax

    Ok. Managed to fix this in the content.checkout.medium-up.php Now the default tax doesnt show up when a customer is poking around. Also the Shipping rates display the default State and Country for the initial quote and Estimates. The modifications and additions highlights in "RED" {if isset($SHIPPING)} <tr> <td colspan="4"> {$LANG.basket.shipping_select}: {$ESTIMATES.state} {$ESTIMATES.country} <select name="shipping"> <option value="">{$LANG.form.please_select}</option> {foreach from=$SHIPPING key=group item=methods} {if $HIDE_OPTION_GROUPS ne '1'} <optgroup label="{$group}">{/if} {foreach from=$methods item=method} <option value="{$method.value}" {$method.selected}>{$method.display}</option> {/foreach} {if $HIDE_OPTION_GROUPS ne '1'} </optgroup> {/if} {/foreach} </select> </td> <td>{$LANG.basket.shipping} {if $ESTIMATE_SHIPPING} (<a href="#" onclick="$('#getEstimate').slideToggle();">{$LANG.common.estimated}</a>) <div id="getEstimate" class="hide panel callout"> <h4><svg class="icon right" id="getEstimateClose" onclick="$('#getEstimate').slideUp();"><use xlink:href="#icon-times"></use></svg>{$LANG.basket.specify_shipping}</h4> <label for="estimate_country">{$LANG.address.country}</label> <select name="estimate[country]" id="estimate_country" class="nosubmit country-list" rel="estimate_state"> {foreach from=$COUNTRIES item=country}<option value="{$country.numcode}" {$country.selected}>{$country.name}</option>{/foreach} </select> <label for="estimate_state">{$LANG.address.state}</label> <input type="text" name="estimate[state]" id="estimate_state" value="{$ESTIMATES.state}" placeholder="{$LANG.address.state}"> <label for="estimate_postcode">{$LANG.address.postcode}</label> <input type="text" value="{$ESTIMATES.postcode}" id="estimate_postcode" placeholder="{$LANG.address.postcode}" name="estimate[postcode]"> <input type="submit" name="get-estimate" class="button expand" value="{$LANG.basket.fetch_shipping_rates}"> <script type="text/javascript"> var county_list = {$STATE_JSON}; </script> </div> {/if} </td> <td class="text-right">{$SHIPPING_VALUE}</td> </tr> {/if} {if $IS_USER} {foreach from=$TAXES item=tax} <tr> <td colspan="4"></td> <td>{$tax.name}{$CUSTOMER_LOCALE.mark}</td> <td class="text-right">{$tax.value}</td> </tr> {/foreach} {/if}
  2. jka

    Tax

    I may have nibbled on this topic before. Any chance to suppress the TAX until the user signs in or enters a valid billing or shipping address? Right now it pulls the default State of the business and displays it. This is confusing for some domestic and overseas customers. From content.checkout.medium-up.php {foreach from=$TAXES item=tax} <tr> <td colspan="4"></td> <td>{$tax.name}{$CUSTOMER_LOCALE.mark}</td> <td class="text-right">{$tax.value}</td> </tr> {/foreach}
  3. jka

    View Cart

    The "Link products to specific shipping services" Extension is throwing the initial 302 and making the page rendering a double call. i disabled it and the 302 went away.
  4. Ok. I have tracked this down to a Shipping Extension.
  5. I wanted to start this thread separately. For folks using SSL for their CC instances : Can you please use FireFox Network diagnostics and check if your First GET is a 302 for index.php?_a=basket I notice this 302 as standard 1st response for all basket/cart related GET/POST. This doubles the time of your page rendering for Cart and Checkout. However this is not the case for Home Page and Product Pages.
  6. jka

    View Cart

    Hello Noodleman, I guess the conflict on the shipping options is causing the delays. (This is apart from the initial 302 for each page reload GET or POST) The modules conflicting are "Calculate UPS Shipping Charges based in Multiple Packages". (FYI, this extension is awesome for our multiple boxes) We also use Link products to specific shipping services. (This does not call the above extension). So we also enable the UPS Contract to call the Multiple Packages extension. Unless we enable the UPS Contract, the cheaper UPS options are not displayed. In a strange the combo of the above works so far. The overall rendering of 3000ms is doubled due to the initial 3000ms of "302 GET"
  7. jka

    View Cart

    Will do. However the first 302 GET seems to be confusing. Does CC redirect for SSL? Instead of rendering all pages and agnostic of 80 vs 443? Infant every call on or reload or post all starts with a 302. ?? The URL seems to be explicitly called or posted as https:// . Do this 302 is a bit confusing for all renderings GET or POST as the 1st line.
  8. jka

    View Cart

    Just checked. The 2 lines that caught my attention was as follows ... 1. 302 GET index.php?-a=basket 4663ms 2. 200 GET index.php?-a=basket 4585ms Both point at the same IPAddress:443. Then then rest of the page rendered. When I check for shipping options/prices, the same happens again when the page reloads.
  9. jka

    View Cart

    I have been noticing some delay when the ViewCart pages '?basket... renders. The main home page, product pages etc render within secs. However the whole view cart, secure checkout is a bit slow. Anything I can do? We do use different shipping options to check for rates. Is this the one slowing up the system, when its initially loading trying to get rates from everywhere?
  10. Thanks & Thanks to you BSmither. It works great. I did this for the multiple products in an order and it works great. <td> {foreach $order.inventory as $prod} <div class = row> {$prod.product_code} {/foreach} </div> </td>
  11. BSmither, On a different note, I have possibly figured out how to add a line on the un-settled orders to also show 'product_code'. The product code is is in _order_inventory table. Here is a code from /admin-folder/sources/dashboard.index.inc.php. If we can add code to also get data from the order_inventory table, we will be able to then display the Product_Code for each order in the dashboard. ## Pending Orders Tab $page = (isset($_GET['orders'])) ? $_GET['orders'] : 1; $unsettled_count = $GLOBALS['db']->count('CubeCart_order_summary', 'cart_order_id', array('status' => array(1, 2))); $results_per_page = 25; $unsettled_orders = $GLOBALS['db']->select('CubeCart_order_summary', array('cart_order_id', 'name', 'first_name', 'last_name', 'order_date', 'customer_id', 'total', 'status'), 'status IN (1,2) OR `dashboard` = 1', '`dashboard` DESC, `status` DESC,`order_date` ASC', $results_per_page, $page);
  12. BSmither, You are correct. I added a Debug line to get formatDispatchDate() to make sure the function was working while we were experimenting.
  13. Here is the code insert .... that works .. // Courier Tracking URLs if (!empty($order['ship_method'])) { // Load the module $method = str_replace(' ', '_', $order['ship_method']); $ship_class = CC_ROOT_DIR.'/modules/shipping/'.$method.'/'.'shipping.class.php'; if (file_exists($ship_class)) { include $ship_class; if (class_exists($method) && method_exists((string)$method, 'tracking')) { $shipping = new $method(false); $url = $shipping->tracking($order['ship_tracking']); $url = (empty($url) && filter_var($order['ship_tracking'], FILTER_VALIDATE_URL)) ? $order['ship_tracking'] : $url; $delivery = array( 'url' => $url, 'method' => $order['ship_method'], 'product' => $order['ship_product'], 'tracking' => $order['ship_tracking'], 'date' => (!empty($order['ship_date']) && $order['ship_date']!=='0000-00-00') ? formatDispatchDate($order['ship_date']) : '' ); } unset($ship_class); } else { $delivery = array( 'url' => filter_var($order['ship_tracking'], FILTER_VALIDATE_URL) ? $order['ship_tracking'] : '', 'method' => $order['ship_method'], 'product' => $order['ship_product'], 'tracking' => $order['ship_tracking'], 'date' => (!empty($order['ship_date']) && $order['ship_date']!=='0000-00-00') ? formatDispatchDate($order['ship_date']) : '' ); } if (empty($delivery['date'])) $delivery = array( 'method' => $order['ship_method'], 'product' => $order['ship_product'], 'tracking' => $order['ship_tracking'], 'date' => (!empty($order['ship_date']) && $order['ship_date']!=='0000-00-00') ? formatDispatchDate($order['ship_date']) : '' ); if (empty($delivery['date']) && empty($delivery['url']) && empty($delivery['tracking'])) $delivery = false; } else { $delivery = false; } $GLOBALS['smarty']->assign('DELIVERY', $delivery);
  14. Hello BSmither, Thanks for pointing me in the right direction. It was due to the IF condition, it was not setting the $delivery. I added another condition and I can now see Ship Date in the Order Page. It does not however display Shipping Method yet. Thats next.
  15. So the formatDispatchDate works ... I just added another debug line right after the date .. [1] The ship_method exists at line 2350[2] 2017-07-10[3] The date argument is at 410: 2017-07-10[4] The format to use is at 419: %b %d %Y[5] Returning from formatDispatchDate at 420 with: Jul 10 2017[6] Jul 10 2017[7] The delivery date is at line 2399 . After poking around a bit, the $delivery array is not getting populated.
  16. Completed that Edit for Order line ... Here is the result [0] The order data at line 2299 is: Array ( [id] => 172 .....bunch of details then ... [ship_product] => UPS Ground [ship_date] => 2017-07-06 [ship_tracking] => I added ... $GLOBALS['debug']->debugMessage($order['ship_date']);
  17. Will do that now. By the way I added a DEBUG to display ship_date. Here goes after that ... Debug Messages:[0] The ship_method exists at line 2347[1] 2017-07-06[2] The delivery date is at line 2394 .
  18. I completed both the edits. I am able to see the ship_date for the order in the database.
  19. Hello BSmither, Here is the Debug results ... Debug Messages:[0] The ship_method exists at line 2347[1] The delivery date is at line 2392 . It looks like the Debug messages from functions.inc.php didnt show up
  20. Any way I can debug for next steps. I dont remember the shipping date ever displayed in the past. By the way the ship_date looks like 2017-07-06 in the table. Is it looking elsewhere?
  21. BSmither, One last point. I had a look at the order table using the phpadmin. The Ship_Method is very inconsistent for different orders (understandably). For UPS Expedited its says UPS_Delivery, whereas for UPS Ground its says UPS Delivery. In some cases, it also says NULL. However the sample order that i am trying to see has all the data properly in the table.
  22. Here is the date format attached Here is a code snippet ... the question is that it is looking for /modules/shipping/'.$method.'/' shipping.class.php // Courier Tracking URLs if (!empty($order['ship_method'])) { // Load the module $method = str_replace(' ', '_', $order['ship_method']); $ship_class = CC_ROOT_DIR.'/modules/shipping/'.$method.'/'.'shipping.class.php'; if (file_exists($ship_class)) { include $ship_class; if (class_exists($method) && method_exists((string)$method, 'tracking')) { $shipping = new $method(false); $url = $shipping->tracking($order['ship_tracking']); $url = (empty($url) && filter_var($order['ship_tracking'], FILTER_VALIDATE_URL)) ? $order['ship_tracking'] : $url; $delivery = array( 'url' => $url, 'method' => $order['ship_method'], 'product' => $order['ship_product'], 'tracking' => $order['ship_tracking'], 'date' => (!empty($order['ship_date']) && $order['ship_date']!=='0000-00-00') ? formatDispatchDate($order['ship_date']) : '' ); } unset($ship_class); } else { $delivery = array( 'url' => filter_var($order['ship_tracking'], FILTER_VALIDATE_URL) ? $order['ship_tracking'] : '', 'method' => $order['ship_method'], 'product' => $order['ship_product'], 'tracking' => $order['ship_tracking'], 'date' => (!empty($order['ship_date']) && $order['ship_date']!=='0000-00-00') ? formatDispatchDate($order['ship_date']) : '' ); } if(empty($delivery['date']) && empty($delivery['url']) && empty($delivery['tracking'])) { $delivery = false; } } else { $delivery = false; } $GLOBALS['smarty']->assign('DELIVERY', $delivery);
  23. Forgot to add ... I am using Foundation Skin cc version 6.1.4. this is to show the Customers the Delivery details under the order.
  24. Hello bsmither, Did all of the above. (including checking db, looks good there). Here is the result from the DEBUG $DELIVERY Origin: "Smarty object" Value false I checked and the Delivery Method, etc, date exists in the order.
×
×
  • Create New...