Move shipping settings general tab

Hi,

my problem:

vendors keep on forgetting to add shipping weight whenever they add new products. as a solution, I wish to move the shipping properties fields to the main or general tab. by default, the shipping tab only appears after creating a product. I understand why its designed this way but I need to tweak it.



I tried to copy paste the fields to update.tpl, however it looks like its not that simple. The fields are there but the details are not saved.



Any help is appreciated



im using 2.2.4 MVE

In controllers/admin/products.php you should have:


// [Page sections]
Registry::set('navigation.tabs', array (
'detailed' => array (
'title' => fn_get_lang_var('general'),
'js' => true
),
'images' => array (
'title' => fn_get_lang_var('images'),
'js' => true
),
'qty_discounts' => array (
'title' => fn_get_lang_var('qty_discounts'),
'js' => true
),
'addons' => array (
'title' => fn_get_lang_var('addons'),
'js' => true
),
'subscribers' => array (
'title' => fn_get_lang_var('subscribers'),
'js' => true
)
));
// [/Page sections]




Just change it to:


// [Page sections]
Registry::set('navigation.tabs', array (
'detailed' => array (
'title' => fn_get_lang_var('general'),
'js' => true
),
'images' => array (
'title' => fn_get_lang_var('images'),
'js' => true
),
'shippings' => array (
'title' => fn_get_lang_var('shipping_properties'),
'js' => true
),
'qty_discounts' => array (
'title' => fn_get_lang_var('qty_discounts'),
'js' => true
),
'addons' => array (
'title' => fn_get_lang_var('addons'),
'js' => true
),
'subscribers' => array (
'title' => fn_get_lang_var('subscribers'),
'js' => true
)
));
// [/Page sections]




Basically I added:


'shippings' => array (
'title' => fn_get_lang_var('shipping_properties'),
'js' => true
),




This will make the shipping tab “on” when adding a new product.



Hope that helps,



Brandon

Nice as always brandonvd!

thanks flow! I'll give that a try!

does anybody know how to do this for Product features?

I tried this and it works fine (shipping is now always visible). However, I can't seem to save the shipping settings in the general tab.



here's what i Added to general tab



{$lang.free_shipping}:




The setting is not saved If i check the free shipping checkbox in the general tab. I still need to update this in the shipping tab. I know I'm missing something but im not sure. any clues?

thanks!
[quote name='brandonvd' timestamp='1328757687' post='130867']
In controllers/admin/products.php you should have:

```php // [Page sections]
Registry::set('navigation.tabs', array (
'detailed' => array (
'title' => fn_get_lang_var('general'),
'js' => true
),
'images' => array (
'title' => fn_get_lang_var('images'),
'js' => true
),
'qty_discounts' => array (
'title' => fn_get_lang_var('qty_discounts'),
'js' => true
),
'addons' => array (
'title' => fn_get_lang_var('addons'),
'js' => true
),
'subscribers' => array (
'title' => fn_get_lang_var('subscribers'),
'js' => true
)
));
// [/Page sections] ```

Just change it to:

```php // [Page sections]
Registry::set('navigation.tabs', array (
'detailed' => array (
'title' => fn_get_lang_var('general'),
'js' => true
),
'images' => array (
'title' => fn_get_lang_var('images'),
'js' => true
),
'shippings' => array (
'title' => fn_get_lang_var('shipping_properties'),
'js' => true
),
'qty_discounts' => array (
'title' => fn_get_lang_var('qty_discounts'),
'js' => true
),
'addons' => array (
'title' => fn_get_lang_var('addons'),
'js' => true
),
'subscribers' => array (
'title' => fn_get_lang_var('subscribers'),
'js' => true
)
));
// [/Page sections] ```

Basically I added:

```php 'shippings' => array (
'title' => fn_get_lang_var('shipping_properties'),
'js' => true
), ```

This will make the shipping tab "on" when adding a new product.

Hope that helps,

Brandon
[/quote]

Hi,

I couldn't create a new post in this forum which is why I'm replying to this post. Please do excuse this doesn't fit the topic.

So, I want make some changes with the discussion addon that comes along with cs cart.

I'd like to show the modal which normally when we click on "New Post" should pop up when "Communication" tab is clicked in Orders Page.

$navigation_tabs = Registry::get('navigation.tabs');
$navigation_tabs['discussion'] = array(
                    'title' => __('communication'), //
                    'js' => true,
                    );


This is how to code looks like. I don't know what are all the parameters that we can pass in through the navigation_tabs array.

I tried doing something like this below.

$navigation_tabs['discussion'] = array(
                    'title' => __('communication'), //
                    'js' => true,
                    'data-ca-target-id' => 'new_post_dialog_',
                    'class' => 'ty-tabs__a cm-dialog-opener cm-dialog-auto-size',
                    'href' => 'orders.details?order_id=' . $_REQUEST['order_id'] . '&selected_section=discussion'
                    );
But only the href value seems to work. Neither the class nor the data-ca-target-id seems to be working.
How can I pass the class and the data-ca-target-id attribute to the tab link. ?
Also I wanna know what are the parameters that we can pass to the Registry navigation.tabs.
Can anyone help me with this situation ?
Thanks