WordPress.org

Support

Support » Plugins and Hacks » WP eCommerce » [Resolved] Control Default View, Grid View etc. in shortcode

[Resolved] Control Default View, Grid View etc. in shortcode

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Justin Sainton

    @justinsainton

    It is not currently possible to use the view_type parameter with the products shortcode.

    That was an example parameter, are you sure there is no way shape or form to control the view on specific category pages? I found what looks to be a way and have hit a problem: http://wordpress.org/support/topic/catalog-view-overide-setting-not-working

    I am having the same problem

    Plugin Author Justin Sainton

    @justinsainton

    Looking at some fairly old code in wpsc_include_products_page_template() – it seems that if you set the GET param ‘display_type’ to grid or list – that will do the trick.

    For some reason, this depends on the “show_search” and “show_advanced_search” options to be set on – not sure why. But I did see that, with those options set, the query arg worked.

    For example, http://ms-test-two.zaowebdesign.com/?view_type=list

    Hi Justin, Sorry I might be a bit behind you on this one, I looked at your example and changed list at the end of that url and got the different views to work (list is what I want anyways) and your example works prefect, how did you get this to work, I try it on my site and it has no effect, sorry if I misunderstood this, but is there a function I need to turn on/off? Or could it be my permalink structure (currently set at /%postname%/) or do you think it’s the category page domain.com/shop/category/?view_type=list

    Also, my code knowledge is very limited, so would you be able to guide me as to where I can find wpsc_include_products_page_template()?

    So far I can follow the URL change at the end, but am unsure as to what you mean when referring to functions and templates, what do I need to do with those?

    Thank you for all your help

    @bobspalding it doesn’t look like there is a category on the end of the example url have you tried using the view-type on the end of the url you want to change?

    Sorry, I’ll re-word this, in the example url it is set like this: domain.com/?view_type=list I am set up like this domain.com/shop/category/?view_type=list, what I am saying is, I add that parameter to the end of my url and nothing happens, I’m asking if my permalink structure has a part to play in this?

    I really don’t know, but I am certain that Justin’s method of putting something at the end of the url I want to change is the way forward, it’s what I want down to a T apart from the fact it doesn’t work. That is where I am stuck.

    Is there a PHP file that needs modifying for this to work?

    Here is my setup to help you understand;

    On the homepage I have a shortcode on marquee, this is the ‘featured’ category, this is set to 100 and in Grid View.

    I want my product category pages however, to be in list view, so if i can get Justin’s parameter working that would be amazing and bang on.

    Like I said earlier, for some unknown reason, I cannot seem to pull it off.

    If it would help you can e-mail me on daniel@bobspalding.com

    I have spent a day trying to get this to work with Justin’s method, no Googled page can tell me how to use GET param ‘display_type’ or anything, what was in that example is exactly what I am looking for, another day nearly gone and I am no further forward on this project because of 1 minor issue, does nobody know how to get this to work? I am desperate someone please help

    Hi Justin, function works great, just one issue, the bar with the customize view options and search on it which appears on the products page appears when I use shortcode, currently, I use this shortcode in a marquee and as you can imagine the bar marquees with the featured category, how can I disable this bar in shortcode? Otherwise all is fine.

    How did you get the function to ‘work great’ I use it at the end of the domain and it has no effect

    It took me a while too, but once you know all will make sense, simply go to Settings > Store > Presentation > Show Search and tick all the boxes including Advanced search etc. Refresh the page and the function now works, but the problem I have from here is the bar that appears as a result of enabling the search shows when I use a shortcode on other pages so I get content appear then underneath I get this bar with a 100% width then the products and it doesn’t look right… whatever theme I switch to!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Resolved] Control Default View, Grid View etc. in shortcode’ is closed to new replies.
Skip to toolbar