Collection of library function in the opencart by Rupak Nepali




These are the library name that we can get in the opencart
cache, captcha, cart, config, currency, customer, db, document, encryption, image, json, language, length, log, mail, pagination, request, response, session, tax, template, user, weight
How we can use the library:
$this->cache->function_name_available();
List of function name in the respective category:
Cache:
    $this->cache->get($key);
    $this->cache->set($key, $value):
    $this->cache->delete($key):

Captcha:
Captcha contains only two function and they are below:
getCode():
showImage():

Cart:
Functions that are in the cart library of opencart are:
$this->cart->getProducts():
add($product_id, $qty = 1, $options = array()):
update($key, $qty):
remove($key):
clear():
getWeight():
setMinQty():
getSubTotal():
getTaxes():
getTotal():
countProducts():
hasProducts():
hasStock():
hasShipping():
hasDownload():

config:
config consists of 5 functions and they are as follows:
get($key):
set($key, $value):
has($key):
load($filename):

currency:
set($currency):
format($number, $currency = '', $value = '', $format = TRUE):
convert($value, $from, $to):
getId():
getCode():
getValue($currency):
has($currency):

customer:
login($email, $password):
logout():
isLogged():
getId():
getFirstName():
getLastName():
getEmail():
getTelephone():
getFax():
getNewsletter():
getCustomerGroupId():
getAddressId():

db:
query($sql):
escape($value):
countAffected():
getLastId():

document:
setTitle($title):
getTitle():
setDescription($description):
getDescription():
setKeywords($keywords):
getKeywords():
setBase($base):
getBase():
setCharset($charset):
getCharset():
setLanguage($language):
getLanguage():
setDirection($direction):
getDirection():
addLink($href, $rel):
getLinks():
addStyle($href, $rel = 'stylesheet', $media = 'screen'):
getStyles():
addScript($script):
getScripts():
addBreadcrumb($text, $href, $separator = ' > '):
getBreadcrumbs():

encryption:
encrypt($value):
base64_encode()
decrypt($value):

image:
create($image):
save($file, $quality = 100):
resize($width = 0, $height = 0):
watermark($file, $position = 'bottomright'):
crop($top_x, $top_y, $bottom_x, $bottom_y):
rotate($degree, $color = 'FFFFFF'):
filter($filter):
text($text, $x = 0, $y = 0, $size = 5, $color = '000000'):
merge($file, $x = 0, $y = 0, $opacity = 100):
html2rgb($color):

Json:
encode($data):
decode($json, $assoc = FALSE):

Language:

get($key):
load($filename):

Length:
convert($value, $from, $to):
format($value, $unit, $decimal_point = '.', $thousand_point = ','):


log:
write($message):

Mail:
setTo($to):
setFrom($from):
addheader($header, $value):
setSender($sender):
setSubject($subject):
setText($text):
setHtml($html):
addAttachment($file, $filename = ''):
send():

Pagination:
render():

Request:
clean($data):

Response:
addHeader($header):
redirect($url):
setOutput($output, $level = 0):
compress($data, $level = 0):
output():

Session:
$this->session:

Tax:
setZone($country_id, $zone_id):
calculate($value, $tax_class_id, $calculate = TRUE):
getRate($tax_class_id):
getDescription($tax_class_id):
has($tax_class_id):

Template:
fetch($filename):

User:
login($username, $password):
logout():
hasPermission($key, $value):
isLogged():
getId():
getUserName():

Weight:
convert($value, $from, $to):
format($value, $unit, $decimal_point = '.', $thousand_point = ','):

Comments

Popular posts from this blog

Fixed: Opencart installation error linux: warning: fopen(system/storage) failed to open stream: Permission denied

Cloudflare Settings for Marketing Websites