Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Add A New Carrier Rate Topic   * * * * * 2 votes

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 09 December 2014 - 04:02 PM #1

!!! This instruction will not work for CS-Cart and Multi-Vendor 4.4.1 and latest versions

 

Let's image that we should add the Royal Mail carrier. We will use royal_mail string as carrier identifier.

The tutorial is actual for CS-Cart and Multi-Vendor 4.x

1. Versions 4.0.x-4.2.x: Create the var/database/new_carrier.sql file with the following content:
Versions 4.3.x: Create the var/backups/new_carrier.sql file with the following content:
 

INSERT INTO ?:shipping_services (`status`, `module`, `code`, `sp_file`) VALUES ('A', 'royal_mail', '', '');

2. Versions 4.0.x-4.2.x: Log in the admin panel, go to Administration -> Database -> Restore page, select the
new_carrier.sql file and restore it.
Versions 4.3.x: Log in the admin panel, go to Administration -> Backup/Restore page, select the
new_carrier.sql file and restore it.

3. Go to Administration -> Languages -> Translations page and create new language variable:

Language variable: carrier_royal_mail ("carrier_" + carrier identifier)
Value: Royal Mail

4. Versions 4.3.5-4.3.x: Go to point #6

Versions 4.0.x-4.3.5: Edit the design/themes/THEME/templates/common/carriers.tpl file of your CS-Cart installation and replace this part of code:
 

{else}

with this one:
 

{elseif $carrier == "royal_mail"}
{$url = "http://www.royalmail.com/portal/rm/track?trackNumber=`$tracking_number`"}
{$carrier_name = __("royal_mail")}
{else}

where $url means the URL which enables your customers to see carrier delivery tracking information without the need to link to the carrier website. If you do not know such URL, just leave it empty:
 

{$url = ""}

5. Edit the design/themes/THEME/mail/templates/common/carriers.tpl file and apply the same changes there

 

6. Versions 4.3.5-4.3.x only (!)Open the app/schemas/shippings/carriers.php file and add:

'royal_mail' => array(
    'tracking_url_template' => 'http://www.royalmail.com/portal/rm/track?trackNumber=[tracking_number]',
),

after the following lines of code:

'usps' => array(
    'tracking_url_template' => 'https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=[tracking_number]',
),

7. Clear the cache ( Administration > Storage > Clear cache )

8. Check the result


See also:
- How To Add Custom Css With My Changes Addon
- How To Add Custom Javascript With My Changes Addon


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 2,979 posts

Posted 09 December 2014 - 07:06 PM #2

Good idea for addon? :)

4.5.2 SP2


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,053 posts

Posted 10 December 2014 - 02:15 AM #3

@Darius - Why would you create an addon for a one time procedure? Seems the instructions are very complete and clear. Be nice if cs-cart added a hook to the carriers.tpl file so this could in fact be done from an addon (my_change). I.e. no need to modify a distributed file.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • istanbul
  • Junior Member
  • Members
  • Join Date: 23-Jan 10
  • 95 posts

Posted 10 December 2014 - 07:10 AM #4

@Darius - Why would you create an addon for a one time procedure? Seems the instructions are very complete and clear. Be nice if cs-cart added a hook to the carriers.tpl file so this could in fact be done from an addon (my_change). I.e. no need to modify a distributed file.


hello
thanks

How addon (my_chang to)?
example
give away
course code path and codes

Thank you.

 
  • imporcayca
  • Newbie
  • Members
  • Join Date: 19-Mar 15
  • 5 posts

Posted 19 March 2015 - 05:04 PM #5

Let's image that we should add the Royal Mail carrier. We will use royal_mail string as carrier identifier.

The tutorial is actual for CS-Cart and Multi-Vendor 4.x

1. Create the var/database/new_carrier.sql file with the following content:

INSERT INTO cscart_shipping_services (`status`, `module`, `code`, `sp_file`) VALUES ('A', 'royal_mail', '', '');

2. Log in the admin panel, go to Administration -> Database -> Restore page, select the
new_carrier.sql file and restore it.

3. Go to Administration -> Languages -> Translations page and create new language variable:

Language variable: carrier_royal_mail ("carrier_" + carrier identifier)
Value: Royal Mail

4. Edit the design/themes/THEME/templates/common/carriers.tpl file of your CS-Cart installation and replace this part of code:

{else}

with this one:

{elseif $carrier == "royal_mail"}
		{$url = "http://www.royalmail.com/portal/rm/track?trackNumber="}
		{$carrier_name = __("royal_mail")}
{else}

where $url means the URL which enables your customers to see carrier delivery tracking information without the need to link to the carrier website. If you do not know such URL, just leave it empty:

{$url = ""}

5. Edit the design/themes/THEME/mail/templates/common/carriers.tpl file and apply the same changes there

6. Clear the cache ( Administration > Storage > Clear cache )

7. Check the result


See also:
- How To Add Custom Css With My Changes Addon
- How To Add Custom Javascript With My Changes Addon



I have try this, but what about the tracking link, using vivashop theme, i have cscart 4x and i have try all posted in this forums about add tracking link to email notification to customer, and it doesnt work.


Any idea about it?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10,053 posts

Posted 19 March 2015 - 06:20 PM #6

Contact the vendor of the vivashop theme.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • dvsgr
  • Senior Member
  • Authorized Reseller
  • Join Date: 14-Apr 09
  • 1,387 posts

Posted 19 March 2015 - 07:46 PM #7

Hi this is already an addon in our shop, with some added features

See this http://www.cscart.bi...er-cscart4.html

Fotis
Fotis Kourmadas
Cs-Cart Addons - Authorized Reseller 

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 20 March 2015 - 09:14 AM #8

I have try this, but what about the tracking link, using vivashop theme, i have cscart 4x and i have try all posted in this forums about add tracking link to email notification to customer, and it doesnt work.


Any idea about it?


I am not sure about the code of this 3rd party theme. Try to contact them
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • jalnicu
  • Advanced Member
  • Members
  • Join Date: 17-Sep 13
  • 72 posts

Posted 21 May 2015 - 12:17 AM #9

Hi,

Everything works just fine, but the tracking url is not shown in email... I use a default responsive theme, version 4.2.3.

Thank you.

CS-Cart 4.3.4


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 21 May 2015 - 09:41 AM #10

Hi,

Everything works just fine, but the tracking url is not shown in email... I use a default responsive theme, version 4.2.3.

Thank you.


Please make sure that the point #5 is completed. Also try to delete the var/cache directory manually
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • jalnicu
  • Advanced Member
  • Members
  • Join Date: 17-Sep 13
  • 72 posts

Posted 05 June 2015 - 04:43 AM #11

Hi,

The #5 is completed:

{elseif $carrier == "royal_mail"}
			    {$url = "http://www.fancourier.ro/ro/tools/awb-tracking/"}
			    {$carrier_name = __("royal_mail")}
{else}
    {$url = ""}
    {$carrier_name = $carrier}
{/if}

I have deleted var/cache directory manually, but is still not working. This is how my email look:

"
Draga Andrei,

Produsele au fost trimise catre dvs. Informatii cu privire la comanda dvs. sunt precizate mai jos

ID-ul comenzii: #26
Metoda de expediere: Fan Courier
Data expedierii: 05/06/2015, 07:41
Numarul de urmarire: 1234567890

Produse:
1 x Manusi schi Fischer Fashion
Optiuni: Marime: M , Culoare: Alb



Comentarii: Test
Va multumim pentru ca ati ales magazinul nostru.

"

CS-Cart 4.3.4


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 05 June 2015 - 11:05 AM #12

Please send me temporary FTP access so that our specialists can examine the issue
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 823 posts

Posted 24 July 2015 - 12:24 PM #13

@Ecom-labs

I do not have var/database directory in our latest V4.3.3 installed shop. Is this tutorial also valid for V4.3.3 ?

two V4.6.2 and one  V4.2.4 - hedonist working on Sundays


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 24 July 2015 - 02:27 PM #14

@Ecom-labs

I do not have var/database directory in our latest V4.3.3 installed shop. Is this tutorial also valid for V4.3.3 ?


Due to new Backup feature, the database directory was replaced with backups one in the latest version. I will correct the instruction, thank you.
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 823 posts

Posted 24 July 2015 - 04:10 PM #15

Hmm well, I do not even have that "database" directory

two V4.6.2 and one  V4.2.4 - hedonist working on Sundays


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 24 July 2015 - 04:13 PM #16

I mean var/database and var/backups
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 823 posts

Posted 24 July 2015 - 04:30 PM #17

I mean var/database and var/backups


That is weird, I have neither

Attached File  novardatabase.png   39.59KB   12 downloads

two V4.6.2 and one  V4.2.4 - hedonist working on Sundays


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 27 July 2015 - 08:52 AM #18

It should be installed by the upgrade. But you can always create it manually
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • victorb
  • Advanced Member
  • Members
  • Join Date: 29-Oct 12
  • 137 posts

Posted 24 August 2015 - 11:59 AM #19

Hi,

Everything works just fine, but the tracking url is not shown in email... I use a default responsive theme, version 4.2.3.

Thank you.


Hi,

Same problem but I use basic theme Ver. 4.3.2

Do you find a way to make it work ?


tks

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 15,722 posts

Posted 24 August 2015 - 03:46 PM #20

Please make sure that the step #5 is completed
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия