OpenCart 3.0.2
Anyone know what this code does?
if( isset( $this->request->post['sku'] ) )
{
$data['sku'] = $this->request->post['sku'];
}
elseif( !empty( $product_info ) )
{
$data['sku'] = $product_info['sku'];
}
else
{
$data['sku'] = '';
}
ControllerCatalogProduct class's getForm method
1. getForm() only gets called on editing a product and adding a product?
2. elseif gets executed on edit if there is data or no data in the sku field
3. else gets executed on add
so the question is when does the if() or $data['sku'] = $this->request->post['sku']; get executed???
When saving the form from the OC admin catalog products page.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
That gets called when product is loaded/selected from list of products in admin.
1. is called when product form is submitted and either has new product data submitted or editing existing product data is submitted
2. gets called when when product is loaded after clicking edit in the list of products
3. gets called when add new product button is pressed and form is empty waiting for you to enter data
1. is called when product form is submitted and either has new product data submitted or editing existing product data is submitted
2. gets called when when product is loaded after clicking edit in the list of products
3. gets called when add new product button is pressed and form is empty waiting for you to enter data
Who is online
Users browsing this forum: No registered users and 220 guests