Adding a new real-time shipping system to older X-Cart












0















Trying to add a new real time shipping system to an existing, older (4.2.x) version of X-Cart and I can not figure out how to implement it properly. Plan is to put the lookup into a new shipping/mod_*.php file and from what I can tell merge $intershipper_rates with the response I get from the rating API. I just don't know how to reliably integrate it nor if I need to manually add anything into the database to make it work properly. There doesn't seem to be any reference material or documentation for the older version I can easily access to figure it out, either. If anybody can give me a hand wrapping my head around this, I'd appreciate it.










share|improve this question



























    0















    Trying to add a new real time shipping system to an existing, older (4.2.x) version of X-Cart and I can not figure out how to implement it properly. Plan is to put the lookup into a new shipping/mod_*.php file and from what I can tell merge $intershipper_rates with the response I get from the rating API. I just don't know how to reliably integrate it nor if I need to manually add anything into the database to make it work properly. There doesn't seem to be any reference material or documentation for the older version I can easily access to figure it out, either. If anybody can give me a hand wrapping my head around this, I'd appreciate it.










    share|improve this question

























      0












      0








      0








      Trying to add a new real time shipping system to an existing, older (4.2.x) version of X-Cart and I can not figure out how to implement it properly. Plan is to put the lookup into a new shipping/mod_*.php file and from what I can tell merge $intershipper_rates with the response I get from the rating API. I just don't know how to reliably integrate it nor if I need to manually add anything into the database to make it work properly. There doesn't seem to be any reference material or documentation for the older version I can easily access to figure it out, either. If anybody can give me a hand wrapping my head around this, I'd appreciate it.










      share|improve this question














      Trying to add a new real time shipping system to an existing, older (4.2.x) version of X-Cart and I can not figure out how to implement it properly. Plan is to put the lookup into a new shipping/mod_*.php file and from what I can tell merge $intershipper_rates with the response I get from the rating API. I just don't know how to reliably integrate it nor if I need to manually add anything into the database to make it work properly. There doesn't seem to be any reference material or documentation for the older version I can easily access to figure it out, either. If anybody can give me a hand wrapping my head around this, I'd appreciate it.







      x-cart shipping-method






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 21:29









      JasonJason

      284




      284
























          1 Answer
          1






          active

          oldest

          votes


















          0














          In the code below replace the 'CPC' substring with your new shipper code.





          1) Create functions like




          • func_shipper_CPC

          • func_get_package_limits_CPC

          • func_check_limits_CPC


          in a new file like
          shipping/mod_CPC.php



          2) Change the array



          $mods = array("USPS", "CPC", "ARB", "FEDEX");


          in the shipping/myshipper.php



          3) Add a row to the shipping options table



          $params = func_query_first ("SELECT * FROM $sql_tbl[shipping_options] WHERE carrier='CPC'");


          4) Add possible shipping methods in the xcart_shipping table



          INSERT INTO xcart_shipping VALUES (null,'Canada Post Expedited','','L','CPC','81',20,'Y','CEX',0.00,0.00,1020,'','');
          INSERT INTO xcart_shipping VALUES (null,'Canada Post Regular','','L','CPC','82',10,'Y','CRE',0.00,0.00,1010,'','');
          INSERT INTO xcart_shipping VALUES (null,'Canada Post Xpresspost USA','','I','CPC','89',90,'Y','',0.00,0.00,2030,'','');
          .....





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420714%2fadding-a-new-real-time-shipping-system-to-older-x-cart%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            In the code below replace the 'CPC' substring with your new shipper code.





            1) Create functions like




            • func_shipper_CPC

            • func_get_package_limits_CPC

            • func_check_limits_CPC


            in a new file like
            shipping/mod_CPC.php



            2) Change the array



            $mods = array("USPS", "CPC", "ARB", "FEDEX");


            in the shipping/myshipper.php



            3) Add a row to the shipping options table



            $params = func_query_first ("SELECT * FROM $sql_tbl[shipping_options] WHERE carrier='CPC'");


            4) Add possible shipping methods in the xcart_shipping table



            INSERT INTO xcart_shipping VALUES (null,'Canada Post Expedited','','L','CPC','81',20,'Y','CEX',0.00,0.00,1020,'','');
            INSERT INTO xcart_shipping VALUES (null,'Canada Post Regular','','L','CPC','82',10,'Y','CRE',0.00,0.00,1010,'','');
            INSERT INTO xcart_shipping VALUES (null,'Canada Post Xpresspost USA','','I','CPC','89',90,'Y','',0.00,0.00,2030,'','');
            .....





            share|improve this answer




























              0














              In the code below replace the 'CPC' substring with your new shipper code.





              1) Create functions like




              • func_shipper_CPC

              • func_get_package_limits_CPC

              • func_check_limits_CPC


              in a new file like
              shipping/mod_CPC.php



              2) Change the array



              $mods = array("USPS", "CPC", "ARB", "FEDEX");


              in the shipping/myshipper.php



              3) Add a row to the shipping options table



              $params = func_query_first ("SELECT * FROM $sql_tbl[shipping_options] WHERE carrier='CPC'");


              4) Add possible shipping methods in the xcart_shipping table



              INSERT INTO xcart_shipping VALUES (null,'Canada Post Expedited','','L','CPC','81',20,'Y','CEX',0.00,0.00,1020,'','');
              INSERT INTO xcart_shipping VALUES (null,'Canada Post Regular','','L','CPC','82',10,'Y','CRE',0.00,0.00,1010,'','');
              INSERT INTO xcart_shipping VALUES (null,'Canada Post Xpresspost USA','','I','CPC','89',90,'Y','',0.00,0.00,2030,'','');
              .....





              share|improve this answer


























                0












                0








                0







                In the code below replace the 'CPC' substring with your new shipper code.





                1) Create functions like




                • func_shipper_CPC

                • func_get_package_limits_CPC

                • func_check_limits_CPC


                in a new file like
                shipping/mod_CPC.php



                2) Change the array



                $mods = array("USPS", "CPC", "ARB", "FEDEX");


                in the shipping/myshipper.php



                3) Add a row to the shipping options table



                $params = func_query_first ("SELECT * FROM $sql_tbl[shipping_options] WHERE carrier='CPC'");


                4) Add possible shipping methods in the xcart_shipping table



                INSERT INTO xcart_shipping VALUES (null,'Canada Post Expedited','','L','CPC','81',20,'Y','CEX',0.00,0.00,1020,'','');
                INSERT INTO xcart_shipping VALUES (null,'Canada Post Regular','','L','CPC','82',10,'Y','CRE',0.00,0.00,1010,'','');
                INSERT INTO xcart_shipping VALUES (null,'Canada Post Xpresspost USA','','I','CPC','89',90,'Y','',0.00,0.00,2030,'','');
                .....





                share|improve this answer













                In the code below replace the 'CPC' substring with your new shipper code.





                1) Create functions like




                • func_shipper_CPC

                • func_get_package_limits_CPC

                • func_check_limits_CPC


                in a new file like
                shipping/mod_CPC.php



                2) Change the array



                $mods = array("USPS", "CPC", "ARB", "FEDEX");


                in the shipping/myshipper.php



                3) Add a row to the shipping options table



                $params = func_query_first ("SELECT * FROM $sql_tbl[shipping_options] WHERE carrier='CPC'");


                4) Add possible shipping methods in the xcart_shipping table



                INSERT INTO xcart_shipping VALUES (null,'Canada Post Expedited','','L','CPC','81',20,'Y','CEX',0.00,0.00,1020,'','');
                INSERT INTO xcart_shipping VALUES (null,'Canada Post Regular','','L','CPC','82',10,'Y','CRE',0.00,0.00,1010,'','');
                INSERT INTO xcart_shipping VALUES (null,'Canada Post Xpresspost USA','','I','CPC','89',90,'Y','',0.00,0.00,2030,'','');
                .....






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 23 '18 at 7:08









                Ildar AmankulovIldar Amankulov

                352212




                352212






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420714%2fadding-a-new-real-time-shipping-system-to-older-x-cart%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Wiesbaden

                    Marschland

                    Dieringhausen