Post by nortgraf » Sun Aug 11, 2024 11:21 pm

I created a field to insert a label on extensions, featured, bestsellers and latest. The field sends information to the product database and saves it perfectly. But I'm having trouble bringing this information to the front-end.

Code: Select all

<file path="catalog/controller/extension/module/featured.php">
    <operation error="skip">
        <search><![CDATA['rating'      => $rating,]]></search>
        <add position="after"><![CDATA['selo' => $selo,
        'is_new'      => $is_new,]]></add>
    </operation>
    <operation error="skip">
        <search><![CDATA[if ($this->config->get('config_review_status')) {]]></search>
        <add position="before"><![CDATA[
                if ($product_info['selo']) {
                    $data['selo'] = $product_info['selo'];
                } else {
                    $data['selo'] = 0;
                }
                
                ]]></add>
    </operation>
    <operation>
        <search position="replace"><![CDATA[$data['products'][] = array(]]></search>
        <add><![CDATA[
             $data['products'][] = array(
                'selo' => ($this->config->get('selo')),
                
            ]]>
        </add>
    </operation>
</file>
I want to pull the information in ocmod format. I already have the column in the products table and it is saving.
If anyone can help I would be very grateful, I don't understand what is wrong.

Newbie

Posts

Joined
Tue Oct 17, 2023 12:28 am

Post by halfhope » Mon Aug 12, 2024 4:37 am

Hi!

You need to make changes to the product model (sql query) to get these fields from db.

catalog/model/catalog/product.php

My FREE extensions in marketplace. [ security | flexibility | speedup ]


User avatar
Active Member

Posts

Joined
Tue Dec 10, 2013 9:44 pm
Location - San Diego

Post by nortgraf » Mon Aug 12, 2024 10:47 am

I will post all the .xml, in case someone can fix it and even use it, then I ask that you post the correction

Newbie

Posts

Joined
Tue Oct 17, 2023 12:28 am
Who is online

Users browsing this forum: No registered users and 22 guests