X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   save image from inline fileuploader (https://forum.x-cart.com/showthread.php?t=69393)

Gabone 06-17-2014 01:09 AM

save image from inline fileuploader
 
why image is not saving in database?
PHP Code:

protected function defineColumns()
    {
        return array(
            
'name' => array(
                static::
COLUMN_CLASS => 'XLite\View\FormField\Inline\Input\Text',
                static::
COLUMN_NAME => \XLite\Core\Translation::lbl('Slide name'),
                static::
COLUMN_ORDERBY => 100,
            ),
            
'slide_order' => array(
                static::
COLUMN_CLASS => 'XLite\View\FormField\Inline\Input\Text',
                static::
COLUMN_NAME => \XLite\Core\Translation::lbl('Slide ord'),
                static::
COLUMN_ORDERBY => 200,
            ),
            
'path' => array(
                static::
COLUMN_NAME => \XLite\Core\Translation::lbl('Slide image'),
                static::
COLUMN_CLASS         => 'XLite\View\FormField\Inline\FileUploader\Image',
                static::
COLUMN_CREATE_CLASS  => 'XLite\View\FormField\Inline\EmptyField',
                static::
COLUMN_PARAMS        => array('required' => false),
                static::
COLUMN_ORDERBY       => 300,
            ),
        );
    } 


Gabone 06-17-2014 01:25 AM

Re: save image from inline fileuploader
 
i need to save image as it is,i don't need thumbnail, and put image name in database

skiz.bth 04-13-2019 05:12 AM

Re: save image from inline fileuploader
 
Quote:

Originally Posted by Gabone
i need to save image as it is,i don't need thumbnail, and put image name in database


it's very old thread but still does not work.. it is possible to save image url on the list item model?

Ed B. 07-17-2019 08:59 AM

Re: save image from inline fileuploader
 
Well, this suggestion doesn't quite solve your problem, but why not use uploader 'XLite\View\FormField\FileUploader\Image' instead?

Ed B. 07-31-2019 05:44 AM

Re: save image from inline fileuploader
 
The thread https://forum.x-cart.com/showthread.php?t=77065 may help you, if your issues are similar to mine. And if you only need to save url's, you probably don't need Model/Repo/Image/YourEntity/Image.php


All times are GMT -8. The time now is 04:24 PM.

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