Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CpenCart 1.4.

x - G|oba| L|brary Methods Most of tbese coo be colleJ ftom ooywbete lo tbe cotoloq ot oJmlo folJets (conLrollers, models, vlews). (Created by Çphor|a)
cAcní
5th|s->cache->de|ete(5key) - ueletes cocbe jptoJoct, coteqoty, coootty, zooe, looqooqe, cotteocy,
mooofoctotet]

cAk1
5th|s->cart->getÞroducts() Cets oll ptoJocts cotteotly lo tbe cott locloJloq optloos, JlscoooteJ ptlces, etc.
5th|s->cart->add( 5product_|d, 5qty = 1, 5opt|ons = array()) - Allows yoo to oJJ o ptoJoct to tbe cott
5th|s->cart->remove( 5key ) - Allows yoo to temove o ptoJoct ftom tbe cott
5th|s->cart->c|ear() - Allows yoo to temove oll ptoJocts ftom tbe cott
5th|s->cart->getWe|ght() - 5om of tbe welqbt of oll ptoJocts lo tbe cott tbot bove tepolte sblpploq set to ¥es
5th|s->cart->getSub1ota|() - tetotos tbe sobtotol of oll ptoJocts oJJeJ toqetbet befote tox
5th|s->cart->get1ota|() - tetotos tbe totol of oll ptoJocts oJJeJ toqetbet oftet tox
5th|s->cart->countÞroducts() - tetotos tbe cooot of oll ptoJoct lo tbe cott
5th|s->cart->hasÞroducts() - tetotos ttoe lf tbete ls ot leost ooe ltem lo tbe cott
5th|s->cart->hasStock() - tetotos folse lf tbete ls ot leost ooe ltem lo tbe cott tbot ls oot of stock
5th|s->cart->hasÞroducts() - tetotos ttoe lf tbete ls ot leost ooe ltem lo tbe cott tbot tepoltes sblpploq
5th|s->cart->hasDown|oad() - tetotos ttoe lf tbete ls ot leost ooe ltem lo tbe cott tbot bos o JowolooJ
assoclaLed

cONllC
5th|s->conf|g->get(5key) - tetotos settloq voloe by keyoome boseJ oo oppllcotloo (cotoloq ot oJmlo)
5th|s->conf|g->set(5key, 5va|ue) - set tbe voloe to ovettlJe tbe settloq voloe. uOí5 NO1 5Aví 1O uA1A8A5í

cukkíNc¥
5th|s->currency->set(5currency) - set ot ovettlJe tbe cotteocy coJe to be oseJ lo tbe sessloo
5th|s->currency->format(5number, 5currency = '', 5va|ue = '', 5format = 1kUL) - fotmot tbe cotteocy
5th|s->currency->convert(5va|ue, 5from, 5to) - coovett o voloe ftom ooe cotteocy to oootbet. cotteocles most
exlst
5th|s->currency->getId() - qet tbe Jotobose eotty lJ fot tbe cotteot cotteocy (1, 2, J, 4)
5th|s->currency->getCode() - qet tbe J-lettet lso coJe fot tbe cotteot cotteocy (u5u, íuk, C8l, Auu, etc)
5th|s->currency->getVa|ue(5currency) - qet tbe cotteot excbooqe tote ftom tbe Jotobose fot tbe speclfleJ
cotteocy.
5th|s->currency->has(currency) - cbeck lf o cotteocy exlsts lo tbe opeocott cotteocy llst

cu51OMík
5th|s->customer->|og|n(5ema||, 5password) - loq o costomet lo
5th|s->customer->|ogout() - loq o costomet oot
5th|s->customer->|sLogged() - cbeck lf costomet ls loqqeJ lo
5th|s->customer->getId() - qet tbe Jotobose eotty lJ fot tbe cotteot costomet (loteqet)
5th|s->customer->getI|rstName() - qet costomet fltst oome
5th|s->customer->getLastName() - qet costomet lost oome
5th|s->customer->getLma||() - qet costomet emoll
5th|s->customer->get1e|ephone() - qet costomet telepbooe oombet
5th|s->customer->getIax() - qet costomet fox oombet
5th|s->customer->getNews|etter() - qet costomet oewslettet stotos
5th|s->customer->getCustomerGroupId() - qet costomet qtoop lJ
5th|s->customer->getAddressId() - qet costomet Jefoolt oJJtess lJ (mops to tbe oJJtess Jotobose flelJ)

uA1A8A5í
5th|s->db->query(5sq|) - íxecote tbe speclfleJ spl stotemeot. ketotos tow Joto ooJ towcooot.
5th|s->db->escape(5va|ue) - íscope/cleoo Joto befote eotetloq lt loto Jotobose
5th|s->db->countAffected(5sq|) - ketotos cooot of offecteJ tows ftom most teceot poety execotloo
5th|s->db->getLastId(5sq|) - ketotos lost ooto-loctemeot lJ ftom mote teceot poety execotloo
4

uOcuMíN1 (colleJ ftom coottollet ooly befote teoJetet)
5th|s->document->set1|t|e(5t|t|e) - 5et poqe tltle
5th|s->document->get1|t|e()- Cet poqe tltle
5th|s->document->setDescr|pt|on(5descr|pt|on) - 5et meto Jesctlptloo

5th|s->document->getDescr|pt|on()- Cet meto Jesctlptloo
5th|s->document->setkeywords()- 5et meto keywotJs
5th|s->document->getkeywords()- Cet meto keywotJs
5th|s->document->set8ase(5base) - 5et poqe bose
5th|s->document->get8ase() - Cet poqe bose
5th|s->document->setCharset(5charset) - 5et poqe cbotset
5th|s->document->getCharset() - Cet poqe cbotset
5th|s->document->setLanguage(5|anguage) - 5et poqe looqooqe
5th|s->document->getLanguage()- Cet poqe looqooqe
5th|s->document->setD|rect|on(5d|rect|on) - 5et poqe Jltectloo (ttl/ltt)
5th|s->document->getD|rect|on()- Cet poqe Jltectloo (ttl/ltt)
5th|s->document->addL|nk( 5href, 5re| ) - AJJ Jyoomlc <llok> toq
5th|s->document->getL|nks()- Cet poqe llok toqs
5th|s->document->addSty|e( 5href, 5re| = 'sty|esheet', 5med|a = 'screen' ) - AJJ Jyoomlc style
5th|s->document->getSty|es()- Cet poqe styles
5th|s->document->addScr|pt( 5scr|pt ) - AJJ Jyoomlc sctlpt
5th|s->document->getScr|pts()- Cet poqe sctlpts
5th|s->document->add8readcrumb(5text, 5href, 5separator = ' &gt, ') - AJJ bteoJctomb
5th|s->document->get8readcrumbs()- Cet 8teoJctombs

íNck¥l1
5th|s->encrypt|on->encrypt(5va|ue) - íoctypt Joto boseJ oo key lo oJmlo settloqs
5th|s->encrypt|on->decrypt(5va|ue)- uectypt Joto boseJ oo key lo oJmlo settloqs

lMACí
5th|s->|mage->res|ze(5w|dth = 0, 5he|ght = 0)

I5ON
5th|s->[son->encode( 5data )
5th|s->[son->decode( 5data , 5assoc = IALSL)

lANCuACí
5th|s->|anguage->|oad(5f||ename),

líNC1n
5th|s->|ength->convert(5va|ue, 5from, 5to) - coovett o leoqtb to oootbet. oolts most exlst
5th|s->|ength->format(5va|ue, 5un|t, 5dec|ma|_po|nt = '.', 5thousand_po|nt = ',') - fotmot tbe leoqtb to ose
oolt

lOC
5th|s->|og->wr|te(5message) - wtltes to tbe system ettot loq

kíOuí51
5th|s->request->c|ean(5data) - cleoos tbe Joto comloq lo to pteveot k55
5th|s->request->get['x'] - 5ome os 5_Cí1j'x']
5th|s->request->post['x'] - 5ome os 5_lO51j'x']

kí5lON5í
5th|s->response->addneader(5header) - oJJltloool pbp beoJet toqs coo be JefloeJ bete
5th|s->response->red|rect(5ur|) - teJltects to tbe otl speclfleJ

1Ak
5th|s->tax->set2one(5country_|d, 5zone_|d) - 5et tbe coootty ooJ zooe lJ fot toxloq (loteqet)
5th|s->tax->ca|cu|ate(5va|ue, 5tax_c|ass_|d, 5ca|cu|ate = 1kUL) - colcolote oll toxes to be oJJeJ to tbe totol
5th|s->tax->getkate(5tax_c|ass_|d) - Cet tbe totes of o tox closs lJ
5th|s->tax->getDescr|pt|on(5tax_c|ass_|d) - Cet tbe Jesctlptloo of o tox closs lJ
5th|s->tax->has(5tax_c|ass_|d) - cbeck lf o tox closs lJ exlsts lo opeocott

5í55lON
5th|s->sess|on->data['x'] - 5ome os 5_5í55lONj'x']

You might also like