[SOLVED] Flat Rate Shipping problem (CGFlatRateShipping)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
timdebuurman
Power Poster
Power Poster
Posts: 891
Joined: Sun Nov 06, 2011 8:15 pm
Location: Deventer, Netherlands

[SOLVED] Flat Rate Shipping problem (CGFlatRateShipping)

Post by timdebuurman »

Hi,

I have a webshop in CMSMS 2.2.14
Al seems to be working well.

Now I wanted to adjust the Shipping price and it gave a fault once going to Confirm Order screen at frontend.
The change I made was from:
{if $value > 75}0{else if $weight < 1}2.95{else}5.75{/if}
to:
{if $value > 75}0{else if $weight < 1}2{else}7.95{/if}

The fault on frontend:
Syntax error in template "string:{if $value > 75}0{else if $weight &#..." on line 1 "{if $value > 75}0{else if $weight < 1}2.95{else}5.75{/if}" - Unexpected "62", expected one of: DOLLARID , "id, name" , "#" , "$"

Checking the database (in cms_module_cge_assocdata), it looks like the character '>' and '<' where places as '&#62;' and '&#60;'

So I thought to simply adjust this in de database to '>' and '<', but that does not work.
I'm not sure (not very skilled in this databse-stuf), but maybe my hand-made adjustment made it not match anymore with the rest of the record:

O:23:"CGFlatRateShipping\Zone":1:{s:30:"CGFlatRateShipping\Zone_data";a:8:{s:4:"guid";s:36:"C5227BCF-BD99-46ED-92B1-C84DEB612199";s:4:"name";s:2:"NL";s:9:"countries";a:1:{i:0;s:2:"NL";}s:6:"states";a:0:{}s:10:"postprefix";s:0:"";s:9:"min_price";d:0;s:9:"max_price";d:0;s:10:"expression";s:65:"{if $value &#62; 75}0{else if $weight &#60; 1}2.95{else}5.75{/if}";}}

Any help is appreciated.

--
Hereby my complete system info:
--
----------------------------------------------
Cms Version: 2.2.14
Installed Modules:
AceEditor2: 1.05
AdminSearch: 1.0.5
CGContentUtils: 2.2.3
CGEcommerceBase: 1.8.10
CGExtensions: 1.65.2
CGFEURegister: 1.0.4
CGFlatRateShipping: 1.0
CGJobMgr: 1.3.6
CGPaymentGatewayBase: 1.6.2
CGSimpleSmarty: 2.2.1
CGSmartImage: 1.22.7
CMSContentManager: 1.1.9
CMSMailer: 6.2.14
Captcha: 1.0
Cart2: 1.4.2
CmsJobManager: 0.1.3
DesignManager: 1.1.8
ExaExternalizer: 0.6
FileManager: 1.6.11
FilePicker: 1.0.4.1
FormBuilder: 1.0.2
FrontEndUsers: 3.2.2
Gallery: 2.4.2
JQueryTools: 1.4.2
LISE: 1.3.1
MenuManager: 1.50.3
MicroTiny: 2.2.4
ModuleManager: 2.1.7
NMS: 2.13.3
Navigator: 1.0.9
News: 2.51.9
Orders: 1.23.7
Products: 2.28.5
Search: 1.51.8
SisowGateway: 1.0.3
TinyMCE: 3.2-beta6

Config Information:
php_memory_limit:
max_upload_size: 64000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/Amsterdam
permissive_smarty: false

Php Information:
phpversion: 7.3.5
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22527
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 256M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir: /home/knuddels/:/tmp/:/var/tmp/:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/php56/lib/:/usr/local/php72/lib/:/usr/local/lib/php/
test_remote_url: Success
file_uploads: On (True)
post_max_size: 64M
upload_max_filesize: 64M
session_save_path: No check because open basedir active
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:
allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)
Server Information:
Server Software: Apache/2
Server Api: fpm-fcgi
Server Os: Linux 4.9.0-8-amd64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.2.24
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


----------------------------------------------
Last edited by timdebuurman on Mon Sep 07, 2020 11:24 am, edited 1 time in total.
NextDoorMedia - Online Marketing Partner
https://www.nextdoormedia.nl
User avatar
chrisbt
Dev Team Member
Dev Team Member
Posts: 181
Joined: Sun Sep 05, 2010 6:11 am
Location: Sheffield, UK

Re: Flat Rate Shipping problem (CGFlatRateShipping)

Post by chrisbt »

Maybe you could try using 'lt' instead of '<' https://www.smarty.net/docs/en/language.function.if.tpl
User avatar
timdebuurman
Power Poster
Power Poster
Posts: 891
Joined: Sun Nov 06, 2011 8:15 pm
Location: Deventer, Netherlands

Re: Flat Rate Shipping problem (CGFlatRateShipping)

Post by timdebuurman »

Hey, good tip! It works! THX
NextDoorMedia - Online Marketing Partner
https://www.nextdoormedia.nl
Post Reply

Return to “Modules/Add-Ons”