custom module

Hello Support
 
Firstly thanks for the positive response.
As per you last email, I followed and installed the test module(https://github.com/unaio/una-vendor-test/wiki) in UNA. I was using and follow the all guideline, that are available on git-hub, Test module is working , I have seen the result coming and print 3-time on the front-end eg-"HELLO WORLD".
 
I have paste the array -
 
array (
  'module' => 'vnd_test',
  'method' => 'test',
)
 
 My function name is servicetest() its calling and working. But if i will create more then one custom function,
 How i call and use the core function of the UNA.
Also please let me know if i create a form in html on the page and what action i pass to it so that what ever user pass value in the form i can get that and use to insert in database.
 
Will you provide the more simple custom module example , I need to develop my modules as per my requirement, But without using the core UNA function
its will not possible, And did not find the way to use the functions class in the our document .
 
Please kindly explain , The structure is very complex. I need to know all about that.
 
Regards

  • 2308
  • More
Replies (9)
    • Hello Newquest78!

      I will duplicate my answer to you in support:

      Let's review your questions:

      1) if i will create more then one custom function, How i call and use the core function of the UNA
      --- first of all, you need to have the advanced PHP editor or environment tools like Netbeans or Zend. It will help you to operate with the complex projects like UNA. Especially with the showing of the functions / methods of the included files. For example, here https://github.com/unaio/una/wiki/Common-Mistakes you may see that you can call the function bx_file_get_contents instead of file_get_contents. So this is the common scheme to use to core functions of the UNA - firstly you need to "connect" the source core files with the bx_import('BxDol[Class name]'); function then use this class by the next plan:
      BxDol[Class name]::getInstance()->[some method]
      with the Netbeans, it will be visible more "noticeable". Also, check the following sections in our Wiki:
      https://github.com/unaio/una/wiki/Code-Convention
      https://github.com/unaio/una/wiki/Common-Mistakes
      2) Also please let me know if i create a form in html on the page and what action i pass to it so that what ever user pass value in the form i can get that and use to insert in database.
      For UNA this is better to create forms with the keeping all the points for manage fields etc according to this manual:
      https://github.com/unaio/una/wiki/Dev-Forms

      The structure of modules was described here:

      https://github.com/unaio/una/wiki/Directories-structure#module-structure

      Please review all mentioned links and specify what is left there unclear for you.

      With the best regards, Leonid

      • Hello Leonid,

        Thank you for the response,

        I will review it.  Can you please share how i will config the snip cart in UNA , Actually I have installed the app in my application but, Its created the product perfectly but when i  click on the buy button, it will not redirect to the payment page or other cation, Please let me know the issue will be there . I was follow the your documentation for snip-caret on git-hub . Am waiting for your  positive response . !!

        regards

        • Did you register in Snipcart? Do you see any Javascript errors in browser's console after the pressing of the "Buy" button?

          • Yes i have registered in snip-cart portal , and i am using test mode now , I also checked the console for javascript error , But nother there, So that why i was moving to you. I am going to share the URL please check , Please  -

            http://socialxcash.com/una9/

            above is link,  I have added one product over there, Please kinldy check

            • XMLHttpRequest cannot load https://app.snipcart.com/api/sessions. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://socialxcash.com' is therefore not allowed access. The response had HTTP status code 401.

              • I have fix it  :)

                • So what was the reason of your trouble? I guess it would be interesting for everyone here.

                  • Actually it was my mistake, I have used wrong API key in test mode, So it will showing the console error. May be in future , UNA developer will showing this  error message on application front-end eg"error-pop" , Its more user friendly . It will time saving .

                    Leonids, I need one more thing , Can you please let me know , How i will change the my website layout and design as i need it. actually i need to re-design all things in there.  I wanna use my own css. 

                    Please let me know i will improve it !

                    Waiting for your response.

                    • Actually it was my mistake, I have used wrong API key in test mode, So it will showing the console error. May be in future , UNA developer will showing this  error message on application front-end eg"error-pop" , Its more user friendly . It will time saving .

                      Leonids, I need one more thing , Can you please let me know , How i will change the my website layout and design as i need it. actually i need to re-design all things in there.  I wanna use my own css. 

                      Please let me know i will improve it !

                      Waiting for your response.

                      Login or Join to comment.