Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

save image from inline fileuploader

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-17-2014, 01:09 AM
 
Gabone Gabone is offline
 

Advanced Member
  
Join Date: May 2014
Location: Bucharest
Posts: 37
 

Default 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,
            ),
        );
    } 
__________________
xcart 5
Reply With Quote
  #2  
Old 06-17-2014, 01:25 AM
 
Gabone Gabone is offline
 

Advanced Member
  
Join Date: May 2014
Location: Bucharest
Posts: 37
 

Default 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
__________________
xcart 5
Reply With Quote
  #3  
Old 04-13-2019, 05:12 AM
 
skiz.bth skiz.bth is offline
    
Join Date: Apr 2019
Posts: 1
 

Default 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?
__________________
xcart version 5.3.6.9
Reply With Quote
  #4  
Old 07-17-2019, 08:59 AM
 
Ed B. Ed B. is online now
 

X-Adept
  
Join Date: Apr 2016
Posts: 453
 

Default 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?
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
  #5  
Old 07-31-2019, 05:44 AM
 
Ed B. Ed B. is online now
 

X-Adept
  
Join Date: Apr 2016
Posts: 453
 

Default 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
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:53 PM.

   

 
X-Cart forums © 2001-2020