Post by OpenCode » Thu Jul 19, 2018 5:48 am

Hi, everybody,
we are trying to skip the shipping method if already has been select in the shopping cart.

can anyone check where our code why is not working,

Code: Select all

{ % if (this.session.data['shipping_method'] is defined) %} 
<script type="text/javascript">
$(document).ready(function() {
$('#button-shipping-method').trigger('click');
});
</script>
{% endif % }
we clear cache and refresh modifications, but are not doing anything.

New member

Posts

Joined
Fri Jun 07, 2013 9:31 am

Post by straightlight » Thu Jul 19, 2018 8:56 am

PHP variables cannot be used unless being defined from the controllers or if using the Template Switcher extension.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by OpenCode » Fri Jul 20, 2018 11:44 am

@straightlight
Is base on this viewtopic.php?t=110676#p445064
and from what I can see in the code on OC 3.0.2.0 in the controller it hasn't changed so the code is the same is just our code that is not well formatted.

I am sure you know but you won't tell us because you didn't post a solution...

but Thank you for your time...

anyone else?
is the new twig syntax that's why very few Modules are available for the OC v3. but I'm sure we get there...

New member

Posts

Joined
Fri Jun 07, 2013 9:31 am

Post by straightlight » Fri Jul 20, 2018 6:14 pm

I am sure you know but you won't tell us because you didn't post a solution...
On your own.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 98 guests