\AdminProductsControllerCore

Summary

Methods
Properties
Constants
__construct()
getQuantities()
setMedia()
getList()
ajaxProcessGetCountriesOptions()
ajaxProcessGetCurrenciesOptions()
ajaxProcessGetGroupsOptions()
processDeleteVirtualProduct()
ajaxProcessAddAttachment()
processAttachments()
processDuplicate()
processDelete()
processImage()
processProductAttribute()
processFeatures()
processPricesModification()
processPriceAddition()
ajaxProcessDeleteSpecificPrice()
processSpecificPricePriorities()
processCustomizationConfiguration()
processProductCustomization()
processPosition()
initProcess()
postProcess()
ajaxProcessDeleteProductAttribute()
ajaxProcessDefaultProductAttribute()
ajaxProcessEditProductAttribute()
ajaxPreProcess()
ajaxProcessUpdateProductImageShopAsso()
ajaxProcessUpdateImagePosition()
ajaxProcessUpdateCover()
ajaxProcessDeleteProductImage()
addProductImage()
copyImage()
processAdd()
processStatus()
processUpdate()
checkProduct()
updateDownloadProduct()
updateAccessories()
updateTags()
initContent()
renderKpis()
renderList()
ajaxProcessProductManufacturers()
recurseCategoryForInclude()
initPageHeaderToolbar()
initToolbar()
renderForm()
getPreviewUrl()
processSuppliers()
processWarehouses()
initFormAssociations()
initFormPrices()
initFormSeo()
getPackItems()
initFormPack()
initFormVirtualProduct()
initFormCustomization()
initFormAttachments()
initFormInformations()
initFormShipping()
ajaxProcessaddProductImage()
initFormImages()
initFormCombinations()
initFormAttributes()
renderListAttributes()
initFormQuantities()
initFormSuppliers()
initFormWarehouses()
initFormFeatures()
ajaxProcessProductQuantity()
getCombinationImagesJS()
haveThisAccessory()
initFormModules()
updatePackItems()
getL()
ajaxProcessCheckProductName()
ajaxProcessUpdatePositions()
ajaxProcessPublishProduct()
processImageLegends()
No public properties found
No constants found
_cleanMetaKeywords()
copyFromPost()
loadObject()
processBulkDelete()
_validateSpecificPrice()
checkFeatures()
updateAssoShop()
isTabSubmitted()
isProductFieldUpdated()
_removeTaxFromEcotax()
_applyTaxToEcotax()
_displayDraftWarning()
_getFinalPrice()
_displaySpecificPriceModificationForm()
_getCustomizationFieldIds()
_displayLabelField()
_displayLabelFields()
getCarrierList()
addCarriers()
initPack()
_displayUnavailableProductWarning()
$max_file_size
$max_image_size
$_category
$tab_display
$tab_display_module
$available_tabs
$default_tab
$available_tabs_lang
$position_identifier
$submitted_tabs
$id_current_category
N/A
No private methods found
No private properties found
N/A

Properties

$max_file_size

$max_file_size : integer

Type

integer — Max image size for upload As of 1.5 it is recommended to not set a limit to max image size

$max_image_size

$max_image_size : 

Type

$_category

$_category : 

Type

$tab_display

$tab_display : string

Type

string — name of the tab to display

$tab_display_module

$tab_display_module : 

Type

$available_tabs

$available_tabs : array

The order in the array decides the order in the list of tab. If an element's value is a number, it will be preloaded.

The tabs are preloaded from the smallest to the highest number.

Type

array — Product tabs.

$default_tab

$default_tab : 

Type

$available_tabs_lang

$available_tabs_lang : 

Type

$position_identifier

$position_identifier : 

Type

$submitted_tabs

$submitted_tabs : 

Type

$id_current_category

$id_current_category : 

Type

Methods

__construct()

__construct() 

getQuantities()

getQuantities(  $echo,   $tr) 

Parameters

$echo
$tr

setMedia()

setMedia() 

getList()

getList(  $id_lang,   $orderBy = null,   $orderWay = null,   $start,   $limit = null,   $id_lang_shop = null) 

Parameters

$id_lang
$orderBy
$orderWay
$start
$limit
$id_lang_shop

ajaxProcessGetCountriesOptions()

ajaxProcessGetCountriesOptions() 

ajaxProcessGetCurrenciesOptions()

ajaxProcessGetCurrenciesOptions() 

ajaxProcessGetGroupsOptions()

ajaxProcessGetGroupsOptions() 

processDeleteVirtualProduct()

processDeleteVirtualProduct() 

ajaxProcessAddAttachment()

ajaxProcessAddAttachment() 

processAttachments()

processAttachments() : void

Attach an existing attachment to the product

processDuplicate()

processDuplicate() 

processDelete()

processDelete() 

processImage()

processImage() 

processProductAttribute()

processProductAttribute() 

processFeatures()

processFeatures() 

processPricesModification()

processPricesModification() 

This function is never called at the moment (specific prices cannot be edited)

processPriceAddition()

processPriceAddition() 

ajaxProcessDeleteSpecificPrice()

ajaxProcessDeleteSpecificPrice() 

processSpecificPricePriorities()

processSpecificPricePriorities() 

processCustomizationConfiguration()

processCustomizationConfiguration() 

processProductCustomization()

processProductCustomization() 

processPosition()

processPosition() 

Overrides parent for custom redirect link

initProcess()

initProcess() 

postProcess()

postProcess() : void

postProcess handle every checks before saving products information

ajaxProcessDeleteProductAttribute()

ajaxProcessDeleteProductAttribute() 

ajaxProcessDefaultProductAttribute()

ajaxProcessDefaultProductAttribute() 

ajaxProcessEditProductAttribute()

ajaxProcessEditProductAttribute() 

ajaxPreProcess()

ajaxPreProcess() 

ajaxProcessUpdateProductImageShopAsso()

ajaxProcessUpdateProductImageShopAsso() 

ajaxProcessUpdateImagePosition()

ajaxProcessUpdateImagePosition() 

ajaxProcessUpdateCover()

ajaxProcessUpdateCover() 

ajaxProcessDeleteProductImage()

ajaxProcessDeleteProductImage() 

addProductImage()

addProductImage(object  $product,   $method = 'auto') 

Add or update a product image

Parameters

object $product

Product object to add image

$method

copyImage()

copyImage(integer  $id_product, integer  $id_image,   $method = 'auto') 

Copy a product image

Parameters

integer $id_product

Product Id for product image filename

integer $id_image

Image Id for product image filename

$method

processAdd()

processAdd() 

processStatus()

processStatus() 

processUpdate()

processUpdate() 

checkProduct()

checkProduct() 

Check that a saved product is valid

updateDownloadProduct()

updateDownloadProduct(object  $product,   $edit) : boolean

Update product download

Parameters

object $product

Product

$edit

Returns

boolean

updateAccessories()

updateAccessories(object  $product) 

Update product accessories

Parameters

object $product

Product

updateTags()

updateTags(  $languages, object  $product) : boolean

Update product tags

Parameters

$languages
object $product

Product

Returns

boolean —

Update result

initContent()

initContent(  $token = null) 

Parameters

$token

renderKpis()

renderKpis() 

renderList()

renderList() 

ajaxProcessProductManufacturers()

ajaxProcessProductManufacturers() 

recurseCategoryForInclude()

recurseCategoryForInclude(  $id_obj, array  $indexedCategories, array  $categories, array  $current, integer  $id_category = null,   $id_category_default = null,   $has_suite = array()) 

Build a categories tree

Parameters

$id_obj
array $indexedCategories

Array with categories where product is indexed (in order to check checkbox)

array $categories

Categories to list

array $current

Current category

integer $id_category

Current category id

$id_category_default
$has_suite

initPageHeaderToolbar()

initPageHeaderToolbar() 

initToolbar()

initToolbar() 

renderForm()

renderForm() : string|void

renderForm contains all necessary initialization needed for all tabs

Returns

string|void

getPreviewUrl()

getPreviewUrl(\Product  $product) 

Parameters

\Product $product

processSuppliers()

processSuppliers() 

Post treatment for suppliers

processWarehouses()

processWarehouses() 

Post treatment for warehouses

initFormAssociations()

initFormAssociations(  $obj) 

Parameters

$obj

initFormPrices()

initFormPrices(  $obj) 

Parameters

$obj

initFormSeo()

initFormSeo(  $product) 

Parameters

$product

getPackItems()

getPackItems(\Product  $product = null) : array

Get an array of pack items for display from the product object if specified, else from POST/GET values

Parameters

\Product $product

Returns

array —

of pack items

initFormPack()

initFormPack(  $product) 

Parameters

$product

initFormVirtualProduct()

initFormVirtualProduct(  $product) 

Parameters

$product

initFormCustomization()

initFormCustomization(  $obj) 

Parameters

$obj

initFormAttachments()

initFormAttachments(  $obj) 

Parameters

$obj

initFormInformations()

initFormInformations(  $product) 

Parameters

$product

initFormShipping()

initFormShipping(  $obj) 

Parameters

$obj

ajaxProcessaddProductImage()

ajaxProcessaddProductImage() 

initFormImages()

initFormImages(  $obj) 

Parameters

$obj

initFormCombinations()

initFormCombinations(  $obj) 

Parameters

$obj

initFormAttributes()

initFormAttributes(  $product) 

Parameters

$product

renderListAttributes()

renderListAttributes(  $product,   $currency) 

Parameters

$product
$currency

initFormQuantities()

initFormQuantities(  $obj) 

Parameters

$obj

initFormSuppliers()

initFormSuppliers(  $obj) 

Parameters

$obj

initFormWarehouses()

initFormWarehouses(  $obj) 

Parameters

$obj

initFormFeatures()

initFormFeatures(  $obj) 

Parameters

$obj

ajaxProcessProductQuantity()

ajaxProcessProductQuantity() 

getCombinationImagesJS()

getCombinationImagesJS() 

haveThisAccessory()

haveThisAccessory(  $accessory_id,   $accessories) 

Parameters

$accessory_id
$accessories

initFormModules()

initFormModules(  $obj) 

AdminProducts display hook

Parameters

$obj

updatePackItems()

updatePackItems(\Product  $product) : boolean

delete all items in pack, then check if type_product value is 2.

if yes, add the pack items from input "inputPackItems"

Parameters

\Product $product

Returns

boolean

getL()

getL(  $key) 

Parameters

$key

ajaxProcessCheckProductName()

ajaxProcessCheckProductName() 

ajaxProcessUpdatePositions()

ajaxProcessUpdatePositions() 

ajaxProcessPublishProduct()

ajaxProcessPublishProduct() 

processImageLegends()

processImageLegends() 

_cleanMetaKeywords()

_cleanMetaKeywords(  $keywords) 

Parameters

$keywords

copyFromPost()

copyFromPost(  $object,   $table) 

Parameters

$object
$table

loadObject()

loadObject(  $opt = false) 

Parameters

$opt

processBulkDelete()

processBulkDelete() 

_validateSpecificPrice()

_validateSpecificPrice(  $id_shop,   $id_currency,   $id_country,   $id_group,   $id_customer,   $price,   $from_quantity,   $reduction,   $reduction_type,   $from,   $to,   $id_combination) 

Parameters

$id_shop
$id_currency
$id_country
$id_group
$id_customer
$price
$from_quantity
$reduction
$reduction_type
$from
$to
$id_combination

checkFeatures()

checkFeatures(  $languages,   $feature_id) 

Parameters

$languages
$feature_id

updateAssoShop()

updateAssoShop(  $id_object) 

Parameters

$id_object

isTabSubmitted()

isTabSubmitted(  $tab_name) 

Parameters

$tab_name

isProductFieldUpdated()

isProductFieldUpdated(string  $field, integer  $id_lang = null) : boolean

Check if a field is edited (if the checkbox is checked) This method will do something only for multishop with a context all / group

Parameters

string $field

Name of field

integer $id_lang

Returns

boolean

_removeTaxFromEcotax()

_removeTaxFromEcotax() 

_applyTaxToEcotax()

_applyTaxToEcotax(  $product) 

Parameters

$product

_displayDraftWarning()

_displayDraftWarning(  $active) 

Parameters

$active

_getFinalPrice()

_getFinalPrice(  $specific_price,   $product_price,   $tax_rate) 

Parameters

$specific_price
$product_price
$tax_rate

_displaySpecificPriceModificationForm()

_displaySpecificPriceModificationForm(  $defaultCurrency,   $shops,   $currencies,   $countries,   $groups) 

Parameters

$defaultCurrency
$shops
$currencies
$countries
$groups

_getCustomizationFieldIds()

_getCustomizationFieldIds(  $labels,   $alreadyGenerated,   $obj) 

Parameters

$labels
$alreadyGenerated
$obj

_displayLabelField()

_displayLabelField(  $label,   $languages,   $default_language,   $type,   $fieldIds,   $id_customization_field) 

Parameters

$label
$languages
$default_language
$type
$fieldIds
$id_customization_field

_displayLabelFields()

_displayLabelFields(  $obj,   $labels,   $languages,   $default_language,   $type) 

Parameters

$obj
$labels
$languages
$default_language
$type

getCarrierList()

getCarrierList() 

addCarriers()

addCarriers(  $product = null) 

Parameters

$product

initPack()

initPack(\Product  $product) 

Parameters

\Product $product

_displayUnavailableProductWarning()

_displayUnavailableProductWarning()