Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-20-2017 03:33:00

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Shipping Estimator Changes

Where can we change the "Shipping Estimate" title of the popup at /ShippingEstimate?

Also, how can we reduce this form to just Country and Postcode as the other 2 fields are not used in our shipping calculation.


Simon

Offline

 

#2 04-20-2017 03:48:17

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Shipping Estimator Changes

The title will probably be generated in the $js_docready for the popup - try in the shipestimatorl.php include.

and to edit the content of the pop up would probably mean editing the shipestimator.php include, or you could use css to hide the fields you don't want to see. CSS would probably be the best option as the value of the fields may still be required for the form to process.


Rob

Offline

 

#3 04-20-2017 07:28:44

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Shipping Estimator Changes

Zanart is correct on all points.  Thank you.


Nick Hendler

Offline

 

#4 04-21-2017 05:21:03

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Shipping Estimator Changes

OK thanks for the tips.

The Shipping Estimate pop-up quite often disappears when trying to select the country because the dropdown list extends beyond the boundary of the pop-up. Is there a fix for this?

In addition the country is not defaulting to the "UK - England & Wales" even though this is set in the Default Country Selection.

To remove ResCom field from the form in CCP8 we changed ecom.shipestimator.rescom in core_formfields from SELECT-TABLE to HIDDEN-REG. Is that still OK in K9 or will it break something?

Last edited by sdn (04-21-2017 05:54:07)


Simon

Offline

 

#5 04-21-2017 07:12:01

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Shipping Estimator Changes

(1) I think this was posted before, and it's part of the 9.0.2 update, which is forthcoming.  This coding disables the ability to close modals if they have forms in them.  This was necessary due to recent changes to IOS which unfocus modals when the keyboard is used on mobile devices.  May be coming into play in your situation.  {public}/media/scripts/common.js, line 150 becomes:

Code:

common.min.js line 150 becomes:

     jQuery('#' + params.divid + '--MODAL .kmodalbox').unbind('focusout').focusout(function(){setTimeout(function() {

          if (jQuery(document.activeElement).closest('.kmodalbox').find('.kmodalcontent').length == 1) {return false;}
          if (jQuery('#' + params.divid + '--MODAL').find('form').length == 1) {return false;}

          jQuery('#' + params.divid + '--MODAL').hide('fade', 300);
          setTimeout(function() {jQuery('#' + params.divid + '--MODAL').remove();}, 320);

     },20);});

(2) The country not defaulting may be due to you already having a country designated in your user session.

(3) Yes, you can mod the forum so that the rescom display becomes 'HIDDEN-REG' just like in V8.  Don't forget to blank out the typeparam field and set the defaultvalue to 'R'.


Nick Hendler

Offline

 

#6 04-21-2017 07:12:49

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Shipping Estimator Changes

Edit: Found the full thread on the common.js change:

https://forum.kryptronic.com/viewtopic.php?id=33331


Nick Hendler

Offline

 

#7 04-21-2017 07:56:41

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Shipping Estimator Changes

Thanks for 1 and 2.

For point 3 you say we need to "blank out the typeparam field and set the defaultvalue to 'R' but is this necessary since we have set the Default Residential/Commercial Selection in Dashboard / Store / Component / Settings / Shipping Estimator?

I have change to 'HIDDEN-REG' and it seems to work without any other changes.

Last edited by sdn (04-21-2017 07:57:39)


Simon

Offline

 

#8 04-24-2017 07:11:18

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Shipping Estimator Changes

For point 3 you say we need to "blank out the typeparam field and set the defaultvalue to 'R' but is this necessary since we have set the Default Residential/Commercial Selection in Dashboard / Store / Component / Settings / Shipping Estimator?

Honestly I forgot about that setting. Forget I said "set the defaultvalue to 'R'" - it is not necessary.


Nick Hendler

Offline

 

#9 05-23-2017 12:05:05

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Shipping Estimator Changes

More testing on this has revealed that even after clearing cookies and ensuring "UK - England & Wales" is set at Dashboard / Store / Component / Settings / Shipping Estimator the form still defaults to United States.

So I edited line 165 in ECOM_ShipEstimator.php to

if (empty($country)) {$country = $this->globals('core_settings.ecom.shipestimator_defaultcountry'); $this->CORE_Session->sessvalues('ecom.shipestimator_country', 'UK - England & Wales');}

Now the forms is at last defaulting to "UK - England & Wales". So it appears that setting the country in the management interface is having no effect.

But is my hack going to have unintended consequences elsewhere?

And one other question, would changing the "name" field of an entry in core_formfields have any undesirable consequences. In particular I want to change ZIP/Postal Code to Postcode/Zip Code and State/Province to County/State/Province so the site is more British feeling.

Last edited by sdn (05-24-2017 01:08:55)


Simon

Offline

 

#10 05-24-2017 08:10:12

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Shipping Estimator Changes

(1) I'll look at that setting and ensure it's doing the right thing.  If I find an issue, your mod looks exactly to be what I'd do, so have no worries there, your mod will have no ill effects elsewhere.

(2) Change those names for formfields to whatever you like.  You won't hurt anything.


Nick Hendler

Offline

 

Board footer