How to use setColumns() in JQGrid? - jqgrid

Hi I wish to set the Column values for my grid using setColumns(). Now I don't know how to use the said function.
Can someone help me with this?
Thanks
-Jason
I already know how to use columnChooser. But what I want to happen is to set the grid depends on per users preference. I mean, per customer has its own default columns to be displayed that is saved in the database.
So now, once the page load per customer, the columns for that customer will be the one to be shown on the screen. So I need something that can do this when the page loads. And so far the only option is setColumn (even setcolumn is not the best option).
Do you have anything to offer?
Please help.
Thanks

The setColumn method is old and is not more supported started with jqGrid 4.0.0. You can include grid.setcolumns.js from the plugins directory to use setColumn, but I don't recommend you to use it.
You should use more powerful columnChooser method instead. I recommend you to look at the following answer which describes how to use columnChooser.

Related

Shopware get mainnumber from article

I need to get some attributes from the main article of an article variant. An example:
The user got article SW1234.4 selected. The shop should show the attribute "test" from the main article SW1234 and not from the variant SW1234.4.
I´m thinking about some smarty var with {$sArticle.mainnumber.attr4}
How is this possible?
you should try "{debug}" at first. (Enable popups!)
Now you can see which variables you have access to, maybe the information you are looking for is already stored in a smarty variable.
The Other way would be a custom Plugin which does a select on your articles table and gets the desired information which you than can assign to your view.
e.g.
$this->View()->assign($varname, $value);
I know my reply is a little late, but I am new to this website as a contributer.
Which Shopware Version?
Are u using the responsive theme?
Please provide a little more information. :)

WooCommerce: How to disable variable_product_type_options in my plugin?

I want to disable the call to variable_product_type_options in my plugin. The plugin is a little helper function, that will help the user to create custom variations, instead of going through the regular variations in the default form. I want to do this, because a product has very long loading and saving times when it has too many variations (say, for example 100). Also, nobody really wants to edit these manually. Anyway, they are loaded by default for a product of type "variable", so I want to remove this.
I know, all I have to do is this:
remove_action('woocommerce_product_write_panels', 'variable_product_type_options');
The only problem is, that I can't find the right place to do that. I have tried in the action "woocommerce_loaded" but it's still there. So I need to know which WooCommerce action will be fired after the woocommerce_product_write_panels but before the admin form for the product is processed.

WP7 Changing 1 layout element based on another

Having no luck here trying to find a solution to this.
I've set up a looping selector based on this guide. (I also used the ListLoopingDataSource class in Part 2 in order to have strings in my looping list).
What I want to be able to do is then change another element (an image box/placeholder) on my layout, based on what is currently selected in the looping selector.
No real idea how to do this, the onSelectionChanged event is kind of abstracted and not really useful? I'm not sure how to programmatically change images either, it doesn't look like I can access a resource from the code base, only from the xaml.
Any help/suggestions would be greatly appreciated.
I found that I could do this by using binding.

Change appearence of page dynamically like twitter or tumblr

I'm trying to find tutorials or code to allow users to customise their page, just like twitter ,wordpress and tumblr do.
Could someone tell me what technology their using?
i'm a .net developer, but maybe they're using jquery?
Any help would be great.
Thanks
You can use javascript to change style sheets and the DOM
Question is a bit broad. To change the page you simply need to manipulate the DOM or change the CSS associated with the page's elements. This can be done any number of ways. E.g. you could write out a new CSS class dynamically, you could add new elements to the DOM itself or you could modify the existing attributes of the page. e.g. to set the background of the page you can do something like:
(assuming JQuery)
$("body").css('background-image','url(path/to/image)');
Hope that helps,
-fs

Is it possible to use HTML invoice?

I found it very hard to customize PDF invoice that Magento use. Not only hard to customize, but my client does not like it as well.
Is it possible to disable PDF invoice and use HTML invoice?
I googled it, but found nothing.
There are three real options here to get better invoices:
Write a better invoice system that
still uses PDFs. I've done this for
a client, it takes a long time. Unfortunately, there is no really good way to change the PDFs that Magento generates by default.
Replace the controller/action that
generate the PDFs with ones that
will simply output HTML.
Same as above, but override the
mass-action dropdown to contain your
new entries. This is probably the
easiest, and you can add more
reports while you're at it. Take a
look at
Mage_Adminhtml_Block_Sales_Order_Grid,
specifically _prepareMassaction
Hope that helps.
Thanks,
Joe
http://ext4mage.com/html2pdf-magento-extension.html#
grateful, grateful
But I find it a shame that magento does not have thi in core

Resources