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

LC_USE_CLEAN_URLS error with getImageURL()

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-05-2016, 01:49 AM
 
BurtonTech BurtonTech is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 46
 

Default LC_USE_CLEAN_URLS error with getImageURL()

Hello,

When trying to get a product image URL using getImageURL(), I get the following error:

Code:
Notice: Use of undefined constant LC_USE_CLEAN_URLS - assumed 'LC_USE_CLEAN_URLS' in /<SNIP>/var/run/classes/XLite/Core/ConverterAbstract.php on line 263

Here's the bit of code generating the issue:

Code:
$testproduct = \XLite\Core\Database::getRepo('XLite\Model\Product')->findOneBy(array('sku' => 'TESTSKU')); $imageurl = $testproduct->getImageURL();

$testproduct->getURL() produces the same error, but using getCleanURL() fixes it. Turning Clean URL's on or off doesn't seem to matter...

Any ideas on how to correct the getImageURL() error?

Thank you!
__________________
X-Cart Gold 4.4.5
X-Cart Ultimate 5.2.22
X-Cart Business 5.3.2.13
X-Payments 3
Reply With Quote
  #2  
Old 05-16-2016, 06:09 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: LC_USE_CLEAN_URLS error with getImageURL()

Where do you run these statements from? Is it an X-Cart 5 module? Or is it a custom stand-alone script?

If it is a stand-alone script, did you include all required files as follows?
Code:
... try { define('LC_INCLUDE_ADDITIONAL', true); require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'top.inc.php'); // your statements there } catch (\Exception $e) { \Includes\ErrorHandler::handleException($e); }
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
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 07:11 PM.

   

 
X-Cart forums © 2001-2020