WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
[resolved] Control Default View, Grid View etc. in shortcode (15 posts)

  1. bobspalding
    Member
    Posted 1 year ago #

    Hi, I have looked at the various combinations that can be done with a product category shortcode: http://docs.getshopped.org/documentation/shortcodes-categories/

    But what I want to do is set in the shortcode weather it should view as Grid view, default view, the code I am looking for should function a little like this: (This is not real code:) [product category='test' view-type=grid] .

    Is this possible as I use a shortcode to view grid view products in a marquee (100 in a row) and want the shortcode to make a better appearance elsewhere.
    -Thanks.

    http://wordpress.org/extend/plugins/wp-e-commerce/

  2. Justin Sainton
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. bobspalding
    Member
    Posted 1 year ago #

    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

  4. dsm1
    Member
    Posted 1 year ago #

    I am having the same problem

  5. Justin Sainton
    Member
    Plugin Author

    Posted 1 year ago #

    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

  6. bobspalding
    Member
    Posted 1 year ago #

    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

  7. dsm1
    Member
    Posted 1 year ago #

    @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?

  8. bobspalding
    Member
    Posted 1 year ago #

    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.

  9. bobspalding
    Member
    Posted 1 year ago #

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

  10. bobspalding
    Member
    Posted 1 year ago #

    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

  11. bobspalding
    Member
    Posted 1 year ago #

    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

  12. dsm1
    Member
    Posted 1 year ago #


  13. dsm1
    Member
    Posted 1 year ago #

    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.

  14. bobspalding
    Member
    Posted 1 year ago #

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

  15. dsm1
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.