1

Each Product has a different position in each category. The position only accept numeric and will change it to alphanumeric. So I set the position from catalog_category_product and _index in the database to "varchar".

But it still wont work. So I think, that there is another validation in the php Code. I found the Code in:

app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php:
Line 320:

    $category->setPostedProducts($products);

But i cant find the declaration of the Method "setPostedProducts" anywhere. I searched all files. And where is the MySQL "Update product..." Statement, so that I can check the value before it will be send to the DB? Can someone tell me where can find it? Or I can solve this problem?

The Second thing is, how can i display the Position to the Frontend (.phtml) I Want to show it in Product Listing and View. Thanks

Greetings

2

Ok I got it.

In Mage/Catalog/Model/Resource/Category.php Line 342 and 357
Change (int) to (string)

And

app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php
Delete Line 137:

To show it in frontend:

$_product->getcat_index_position();
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.