Post by andrei.bogdan » Wed Sep 04, 2013 4:20 pm

Free Shipping Alert Qualifier on Cart page and Checkout page

FEATURES
==================================
- Works on any currency
- Calculates the difference between the client's order and the free shipping limit
- Everybody loves Free Shipping, your customers will order more, just to qualify for it
- The displayed message can be easily edited in the XML file, no need to go through other files
- Text messages are available in English and Romana

DESCRIPTION
==================================
- This mod will add an alert box to the Cart and Checkout(Shipping Method section).
- If the client has ordered an amount that is less than the limit set in admin Extensions > Shipping > Free Shipping, the client will see an alert box that tells exactly how much he/she has to order to get Free Shipping.
- This works on the default theme, but I can adapt this to your custom theme.

TROUBLESHOOTING
==================================
1) You must have your store's Free Shipping method installed and the limit set there.
2) If you want to change the text messages yourself, you can change the XML file.
- This module has only been tested with OpenCart 1.5.4.1 and OpenCart 1.5.5.1.
- It might not work with previous versions of OpenCart, use at own risk. It only virtually modifies OpenCart files, so no need to worry.
3) If you have a custom theme, you need to replace in the XML the string 'default' with your theme's name.

Attachments

Last edited by andrei.bogdan on Thu Sep 05, 2013 8:03 pm, edited 1 time in total.

Andrei
andrei.opencart[at]yahoo.com
Themes and Extensions


Active Member

Posts

Joined
Mon Mar 25, 2013 4:52 am

Post by i2Paq » Wed Sep 04, 2013 10:01 pm

Nice work!

Small issue:

Code: Select all

<file name="catalog/language/dutch/checkout/cart.php">
		<operation>
			<search position="after"><![CDATA[$_['heading_title']          = 'Winkelwagen';]]></search>
			<add><![CDATA[
				$_['text_alert']                     = 'You can enjoy Free Shipping for an ordered amount of at least <strong>%s</strong>.<br />You only need to order for <strong>%s</strong> more and you will qualify for Free Shipping!';
				$_['text_notify']					 = 'Your ordered amount is larger than <strong>%s</strong>.<br /> You are qualified for Free Shipping.';
			]]></add>
		</operation>
Does not work for me.

I know that Winkelwagen is the heading_title: <title>Winkelwagen</title>, but it does not work.

In the vqmod-log I see:

Code: Select all

---------- Date: 2013-09-04 15:50:28 ~ IP : 92.65.205.97 ----------
REQUEST URI : /ocdemo1541/index.php?route=checkout/cart
MOD DETAILS:
   modFile   : /var/www/vhosts/opencartdemo.eu/httpdocs/ocdemo1541/vqmod/xml/shipping_alert_en.xml
   id        : Add Free Shipping Alert
   version   : 1
   vqmver    : 2.3.2
   author    : Andrei Bogdan (andrei.opencart@yahoo.com)
SEARCH NOT FOUND (ABORTING MOD): $_['heading_title']          = 'Winkelwagen';

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by andrei.bogdan » Thu Sep 05, 2013 8:07 pm

Hi,

I have uploaded a new version.

Yes, it's a common issue when the language pack doesn't respect the default translations of Open Cart. Many of my clients had their own translations in the language files and the mod can't find the same string there, so it doesn't replace anything.

My advice is to follow the error, open the language files that has problems, get the right string from your language file and then paste your string in the XML(between the "<search>" tags).

If you need any help, let me know.

Andrei
andrei.opencart[at]yahoo.com
Themes and Extensions


Active Member

Posts

Joined
Mon Mar 25, 2013 4:52 am

Post by OSWorX » Thu Sep 05, 2013 9:01 pm

andrei.bogdan wrote:Hi,

I have uploaded a new version.

Yes, it's a common issue when the language pack doesn't respect the default translations of Open Cart. Many of my clients had their own translations in the language files and the mod can't find the same string there, so it doesn't replace anything.

My advice is to follow the error, open the language files that has problems, get the right string from your language file and then paste your string in the XML(between the "<search>" tags).

If you need any help, let me know.
Sorry, but really do not know what you mean with ' .. when the language pack doesn't respect the default translations of Open Cart ..'
What is a 'default translation'??

Everything what can be translated (the values) are not for any interest for somebody else.
The only value which might be for your mods could be the variable, here the $_['heading_title']

So, if your mods are now looking for the whole pair (variable - value) your search & replace will fail, of course.
Would be better for your mods NOT to search for any value(s) because the can contain any other (translated) value.

Or did I misunderstood you?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by andrei.bogdan » Fri Sep 13, 2013 5:37 pm

Hi,

Yes, the mod is looking for the whole pair (variable - value) right now.
That's how they are made, to work with the default theme and the default translations.
They can be easily adapted if you just open the XML files and replace certain translation strings.

Andrei
andrei.opencart[at]yahoo.com
Themes and Extensions


Active Member

Posts

Joined
Mon Mar 25, 2013 4:52 am

Post by Cue4cheap » Sun Jul 03, 2016 8:07 am

Is there a way to have this module show only if the ship to country code is USA (223)?

Thank you,

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am
Who is online

Users browsing this forum: No registered users and 5 guests