Post by jokermanx » Sat Jun 20, 2015 12:46 am

Well i was looking for some manual for create new products and categories from php code, but i couldnt get some examples.
Well what i want, i want to create products and subcategories for them way php code and text. I found some functions like this:
$productData = array(
'name' => 'Product Name Here',
'model' => 'ABC123',
...
);

// Load model into memory if it isn't already
$this->load->model('catalog/product');

// Attempt to pass the assoc array to the add Product method
$this->model_catalog_product->addProduct($productData);

Its should help me create new product. But how could i create new category for every 4-5 products??

Newbie

Posts

Joined
Thu Jun 11, 2015 12:14 am

Post by jokermanx » Sat Jun 20, 2015 11:41 pm

Well i found function addCategory($data) in admin/model/catalog/category.php
Now i am investigating how it works, somebady hame some documentation??

Newbie

Posts

Joined
Thu Jun 11, 2015 12:14 am

Post by IP_CAM » Sun Jun 21, 2015 8:46 am

No such Documentation exists, to my knowledge, at least. Why don't you just copy & paste the Source out of a Category- or whatever Page, displayed on a Browser, and re-use it as more or less ready made Page-Source? I assume, nobody understands anyway, what your'e trying to achieve.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 15 guests