X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   News and Announcements (https://forum.x-cart.com/forumdisplay.php?f=28)
-   -   Webinar for X-Cart 5 developers on March,18th. (https://forum.x-cart.com/showthread.php?t=68723)

Ksenia 02-25-2014 03:19 AM

Webinar for X-Cart 5 developers on March,18th.
 
Attention, X-Cart developers!

We will be happy to see you among the attendees of the webinar about coding modules for X-Cart 5:
http://blog.x-cart.com/webinar-for-x-cart-5-developers.html

Please register. Tony Sologubov will speak.

PS how do you like Tony's photo? I think, our beardie looks awesome. Especially here.

totaltec 02-25-2014 07:14 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Tony looks great! I like the devil picture I saw on Facebook. Code devil!

cflsystems 02-25-2014 09:14 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Will be there

bigredseo 02-25-2014 02:04 PM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Want to view, but it's the day after Saint Patricks Day - pretty sure I'm not going to be sober enough to retain anything.

Are you guys recording the sessions and will re-release at some point?

Ksenia 02-26-2014 01:29 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Quote:

Originally Posted by bigredseo
Are you guys recording the sessions and will re-release at some point?


Hi Conor,

I'm not used to seeing you posting under the name of 'bigredseo' =) I hope this business if prosperous and successful.

Yes, we will record the webinar and upload it on our site. Please register for the webinar - to receive an email with the link. Or, probably, you will still manage to attend.

BCSE 02-26-2014 10:09 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
I registered but didn't get a confirmation email. Can you check it went through ok?

Thanks,

Carrie

Ksenia 02-26-2014 10:17 PM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Quote:

Originally Posted by BCSE
I registered but didn't get a confirmation email. Can you check it went through ok?


It did, I have received a notification about your registration.

Ksenia 03-17-2014 12:37 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Tony's moment of glory is coming. 81 attendees have already registered. Would anyone else like to join the tomorrow webinar? If yes, please register here:

https://xcart.clickwebinar.com/X-Cart5_modules_development/register?lang=en

sinobest 03-17-2014 01:51 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
good news. i will attend the webinar tomorrow.

sinobest 03-17-2014 01:52 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
https://xcart.clickwebinar.com/X-Cart5_modules_development/register?lang=en

can not open this url

BCSE 03-17-2014 08:50 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
I haven't gotten any email with info on how to join or any confirmation. Can you resend it?

Thanks,

Carrie

totaltec 03-17-2014 09:17 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
I just got my email reminder and join link.

BCSE 03-17-2014 10:17 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Quote:

Originally Posted by totaltec
I just got my email reminder and join link.


Hum, I just found it in my spam folder. Thanks.

Carrie

Ksenia 03-18-2014 12:55 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Hi Carrie,

Haven't seen you update about the spam folder, so resent an email with access details...

See you there=)

BCSE 03-18-2014 05:44 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Thanks! I got your email. Not sure why the others went to spam but I put your domain on my white list.

Thanks,
Carrie

chamberinternet 03-18-2014 05:52 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
I won't be able to make the seminar. Will a youtube recording of the seminar be available?

Ksenia 03-18-2014 06:01 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Quote:

Originally Posted by chamberinternet
I won't be able to make the seminar. Will a youtube recording of the seminar be available?


Yes, we do plan to publish it in our youtube channel.

ITVV 03-18-2014 07:12 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Hi,

Is it just me that has lost the webinair?

BBM_ 03-18-2014 07:13 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
No I have also lost it. - poor Tony

edit: it's back

ITVV 03-18-2014 07:14 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
I was getting into the feel of it all as well!!!

Thanks for confirming BBM_

Nick

BCSE 03-18-2014 07:14 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
We can't hear anything either.

Carrie

ITVV 03-18-2014 08:44 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
That was a great overview Tony - Thank you.

Kind regards from the UK

Nick

tony_sologubov 03-18-2014 11:13 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Hi guys!

Thank you for coming today and I am really sorry for that problem happened with our connection. Our admins were trying to create better connection for even better performance and misclicked at some settings.

If you have any comments about webinar organization (for instance, we were told that you cannot hear me well sometimes), please let me know: pm me or leave your comments here. It will help us to arrange better webinar next time.

Besides that, I am going to create a public doc where I will share the info I used for creating the mod + I will answer all questions you were asking with code examples. It will be ready within a week, I believe.

Surely, if you have any feedback about X-Cart 5 development, feel free to send me a message to alliance@x-cart.com or post a new thread on forums.

Ksenia 03-27-2014 08:27 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
This is a video and knowledgebase article from this webinar.

Meanwhile let me please invite you to the second webinar of this series - this time Tony will speak about customizing the skin: http://forum.x-cart.com/showthread.php?t=68938

totaltec 03-31-2014 01:48 PM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Ksenia, Tony,
I think that both of you did an excellent job with this webinar. Especially inpressive is the amount of documentation in the knowledgebase. Well done!

BBM_ 03-31-2014 08:51 PM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Many thanks for the webinar and look forward to the next one.

On a side note will the PayPal webinar be uploaded as unfortunately I missed that one?

Thanks

Ksenia 03-31-2014 10:47 PM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Thank you, guys.
Can't but agree that Tony did a very good job preparing such an article, though it required some kind of "come on, do it, do it now, Antosha" pushing from my side, too=)

Quote:

Originally Posted by BBM_
On a side note will the PayPal webinar be uploaded as unfortunately I missed that one?
Thanks


have just uploaded it to our X-Cart youtube channel, the link to PayPal webinar is here:
http://www.youtube.com/watch?v=9F6vdcJDOow


Also, Bob Angus was going to arrange a guest post to cover the webinar material at least partly. I hoped to publish both simultaneously, but it looks like the text is not ready yet. Once the video is ready, I'll edit this message and share a link to it.

As for upcoming XC5 dev webinar, I've seen only a couple of questions so far. Please do send your questions in advance, it will help Tony to cover the most 'wanted' topics!

totaltec 04-01-2014 03:52 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Tony,
I rarely ask questions but this has me stumped and intrigued at the same time. I have not used the next-sdk that I saw you using in the webinar. I have downloaded it from github, and I'd like to use it on my local Windows machine (yes I develop on Windows, I need it for other things besides coding).

I tried running the macro by calling it in the xampp terminal but it did not work. Where do I run this command: "../../next-sdk/devkit/macros/create-module.php --module=Tony\\News --version=5.0"?

I can make module from scratch, but I want to be cool like you guys and use the sdk. :-)

Thanks

cflsystems 04-01-2014 09:29 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Just put the sdk directory under XC5 root and call it with the ip or domain, whatever you are using

totaltec 04-01-2014 11:32 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Thanks Steve! When I try to call it from the console, I get an error "command not recognized" or it pops the php file up in my text editor. :-)

When I try to call it from the browser, it says "Must be CLI" which I assume means Command Line Interface.

Are you able to use it?

cflsystems 04-01-2014 11:51 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Yes it runs only from the command line. Yes I can use it. And while on Win system most of the time I have an old computer on my internal network running Linux server so I can run proper hosting, not Win, not something simulated.
Get your old x86 laptop and just install Ubuntu Server on it - it will run even on 256MB RAM :) not like Win which will require GBs of RAM just so you can load the system....

tony_sologubov 04-02-2014 03:28 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Hi Mike!

I don't have Win machine to test it out, but I believe you can call next-sdk like this on Win:
Code:

C:\path\to\php\bin ../../next-sdk/devkit/macros/create-module.php --module=Tony\\News --version=5.0

These resources can be helpful as well:
http://stackoverflow.com/questions/15597067/how-to-run-php-from-windows-command-line (explains how you can call it like > php ../../next-sdk/devkit/...)
http://www.php.net/manual/en/install.windows.commandline.php

totaltec 04-02-2014 07:27 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Steve, yes I think I need to bite the bullet and start running Linux again on an old system. Thanks for the advice.

Tony,
I am going to test it out, really appreciate you taking the time to find those resources for me!

Thanks,
-Mike

totaltec 04-02-2014 09:35 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Yay, thanks guys, I got it to work on Windows.

One thing that may be obvious to others that wasn't to me, you need to run the script from within the XC5 installation directory. At first I was wondering, how does the macro know where XC5 is installed? :-)

So for me, my path to php is C:\\xampp\php\php.exe
Path to next-sdk is C:\\xampp\htdocs\next-sdk\
Path to XC5 C:\\xampp\htdocs\xcart\

Running the script within the xcart directory the correct usage was:
..\..\php\php.exe ../next-sdk/devkit/macros/create-module.php --module=Tony\News --version=5.0

Note that using --module=Tony\\News caused an error. May be a quirk related to Windows only, I see that Tony was able to use the double slashes like --module=Tony\\News in his tutorial video.

Anyway, it works, and I learned something new, which is always great. Thanks again.

totaltec 04-03-2014 12:19 PM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Found time to finish working through the tutorial. There is a typo in this section:
"Update controller
Edit the classes/XLite/Module/Tony/News/View/Model/NewsEdit.php file and add the following code there:"

The file path is wrong, it should be:
"classes/XLite/Module/Tony/News/Controller/Admin/NewsEdit.php"

Also, I added this code to the News controller in classes/XLite/Module/Tony/News/Controller/Customer/NewsEdit.php:
Code:

        public function getNewsTitle()
        {
            $id = intval(\XLite\Core\Request::getInstance()->news_id);
 
 
            $return = '';
 
 
            if ($id != 0)
            {
                $news = \XLite\Core\Database::getRepo('XLite\Module\Tony\News\Model\News')->find($id);
 
                if ($news) {
                    $return = $news->getTitle();
                }
            }
 
 
            return $return;
        }

    /**
    * Return the current page title (for the content area)
    *
    * @return string
    */
    public function getTitle()
    {
        return 'News';
    }

    /**
    * Common method to determine current location
    *
    * @return string
    */
    protected function getLocation()
    {
        return $this->getTitle();
    }

This allowed the section name "News" to be displayed in the bread crumb area and the page title. It also allowed me to use the function getNewsTitle() to display the title on the news page in the customer area after adding the following code to skins/default/en/modules/Tony/News/page/news/body.tpl
Code:

<h2>{getNewsTitle():h}</h2>

Thanks again for this learning experience, I feel much better about XC5 and my own ability to work with it.

totaltec 04-06-2014 09:31 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Tony,
I hope you are still watching this thread, and I hope this is a good place to continue asking questions related to the webinar. I have attempted to take your News module a bit further, and currently I am stuck on creating the ability for translations.

I added a class in XLite\Module\Tony\News\Model\NewsTranslation.php
with the following code:
Code:

<?php

namespace XLite\Module\Tony\News\Model;

/**
 * News
 *
 * @Entity
 * @Table (name="news_translations",
 *      indexes={
 *          @Index (name="ci", columns={"code","id"}),
 *          @Index (name="id", columns={"id"})
 *      }
 * )
 */
class NewsTranslation extends \XLite\Model\Base\Translation
{
  /**
    * @Column (type="string", length=255)
    */
  protected $title = '';
 
 
  /**
    * @Column (type="text")
    */
  protected $body = '';
}


I imitated the SimpleCMS module code. I see that there are many instances where the translation ability has been added in this way. But when rebuilding I get this error:
ERROR: "30" (code N/A)

There is no column with name 'id' on table 'xc_news_translations'.

Now, I understand that this means we are missing this column, and that it is referenced in the PHPDoc comment so it must exist. But the other modules do not need to define this column in their translation classes, and I see it is defined in \XLite\Model\Base\Translation. Why does this method work for other modules and not this one?

Ksenia 04-06-2014 11:41 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Hi Mike!

Thank you for posting your findings here. I think Tony does monitor it. I'm also resending the notifications to him, so he has no chance to miss them=) I guess he might be overloaded now, as after the webinar he leaves for vacations. But tomorrow I'll try to take's Tony hand, show the thread and make sure he react properly.

totaltec 04-06-2014 04:05 PM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Thanks Ksenia!

Tony,
I solved the problem (thankfully I was stuck for hours!), but I would still like an explanation of why this works. I found that by modifying XLite\Module\Tony\News\Model\News.php and changing the line:
Code:

class News extends \XLite\Model\AEntity
To:
Code:

class News extends \XLite\Model\Base\I18n
Fixes the error that it was throwing, and the table "xc_news_translations" is successfully created. The functioning of the module appears unchanged besides that.

What is the difference here, and why should we ever use "\XLite\Model\AEntity" if it cannot be translated?

tony_sologubov 04-07-2014 03:34 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Quote:

Originally Posted by totaltec
Running the script within the xcart directory the correct usage was:
..\..\php\php.exe ../next-sdk/devkit/macros/create-module.php --module=Tony\News --version=5.0

Note that using --module=Tony\\News caused an error. May be a quirk related to Windows only


Thanks for spotting it out! I will cover it when I write an article about our SDK.

tony_sologubov 04-07-2014 03:43 AM

Re: Webinar for X-Cart 5 developers on March,18th.
 
Thank you Mike for spotting a mistake! I just corrected it.

As for breadcrumbs, this is perfect that you learned it. The thing about X-Cart 5 code is that it is quite terse. You define a single method and voila breadcrumbs appear.

Quote:

Originally Posted by totaltec
Found time to finish working through the tutorial. There is a typo in this section:
"Update controller
Edit the classes/XLite/Module/Tony/News/View/Model/NewsEdit.php file and add the following code there:"

The file path is wrong, it should be:
"classes/XLite/Module/Tony/News/Controller/Admin/NewsEdit.php"

Also, I added this code to the News controller in classes/XLite/Module/Tony/News/Controller/Customer/NewsEdit.php:
Code:

        public function getNewsTitle()
        {
            $id = intval(\XLite\Core\Request::getInstance()->news_id);
 
 
            $return = '';
 
 
            if ($id != 0)
            {
                $news = \XLite\Core\Database::getRepo('XLite\Module\Tony\News\Model\News')->find($id);
 
                if ($news) {
                    $return = $news->getTitle();
                }
            }
 
 
            return $return;
        }

    /**
    * Return the current page title (for the content area)
    *
    * @return string
    */
    public function getTitle()
    {
        return 'News';
    }

    /**
    * Common method to determine current location
    *
    * @return string
    */
    protected function getLocation()
    {
        return $this->getTitle();
    }

This allowed the section name "News" to be displayed in the bread crumb area and the page title. It also allowed me to use the function getNewsTitle() to display the title on the news page in the customer area after adding the following code to skins/default/en/modules/Tony/News/page/news/body.tpl
Code:

<h2>{getNewsTitle():h}</h2>

Thanks again for this learning experience, I feel much better about XC5 and my own ability to work with it.



All times are GMT -8. The time now is 05:52 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.