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.
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.
Offline
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.
Offline
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)
Offline
(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:
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'.
Offline
Edit: Found the full thread on the common.js change:
https://forum.kryptronic.com/viewtopic.php?id=33331
Offline
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)
Offline
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.
Offline
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)
Offline
(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.
Offline