• Resolved shahroozdc

    (@shahroozdc)


    Hello,

    I am in need of assistance in order to re-arrange my three tabs of “thumbnail” ,”List” and “Detail”. Specifically, I am trying to get my “Detail” tab to be first in order and for the “Detail” page to be the default page. However, I am out of luck and I don’t see an options. Could you please help me?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @shahroozdc,

    You would be able to set the starting tab of the catalog to the Details view using the starting_tab attribute.

    There is no option in the plugin to rearrange the order of the tabs.

    You might be able to rearrange it by making changes in the core plugin file and we can tell you where to look for it in your code. We recommend making changes in the core plugin file only if you are comfortable with that. Any changes that you make will be overwritten when you update the plugin in the future.

    Thread Starter shahroozdc

    (@shahroozdc)

    Hello,

    Thank you for the reply. Could you please tell me where to look for it in the code so I can change it?

    Thank you!

    Hi shahroozdc

    The file you need to alter is in Functions/Shortcodes.php. To change the order of the tabs, you’ll need to rearrange the three statements around lines 680-688.

    Thread Starter shahroozdc

    (@shahroozdc)

    Hi,

    Thank you so much. Could you help me one last time with where I could locate the starting_tab attribute?

    I appreciate your time and help,

    Hi shahroozdc,

    The starting_layout attribute should be added to your shortcode, like this:

    [product-catalog id='1' starting_layout='List']

    Thread Starter shahroozdc

    (@shahroozdc)

    Hello,

    I tried this code around line 741 but it did not work. Am I placing it in the wrong place?

    —————————-

    // If there’s a product select, return that product
    if ((get_query_var(‘single_product’) != “” or $_GET[‘SingleProduct’] != “”) and $catalogue_url == “”) {
    return do_shortcode(“[product-catalog id=’1′ starting_layout=’List’]”);
    }

    Hello @shahroozdc,

    My apologies for any confusion.

    The first thing you want to do is rearrange the tabs in the view, and you can do so by going into the Functions folder and opening the Shortcodes.php file. From there, you want to scroll down to line 680, and replace the code from lines 680 to 688 with the following code:

    	if (!in_array("Detail", $ExcludedLayouts)) {
    		$HeaderBar .= "<a href='#' onclick='ToggleView(\"Detail\"); return false;' title='Detail'><div class='upcp-details-toggle-icon " . $Color . "-details-icon'></div></a>";
    	}
    	if (!in_array("Thumbnail", $ExcludedLayouts)) {
    		$HeaderBar .= "<a href='#' onclick='ToggleView(\"Thumbnail\");return false;' title='Thumbnail'><div class='upcp-thumb-toggle-icon " . $Color . "-thumb-icon'></div></a>";
    	}
    	if (!in_array("List", $ExcludedLayouts)) {
    		$HeaderBar .= "<a href='#' onclick='ToggleView(\"List\"); return false;' title='List'><div class='upcp-list-toggle-icon " . $Color . "-list-icon'></div></a>";
    	}

    From there, you want to go update the shortcode you are using and set the detail view to load first. You can do so by adding the starting_layout attribute.

    Your shortcode should look like this:
    [product-catalog id=’1′ starting_layout=’Detail’]

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Toggle View for “Detail” Tab’ is closed to new replies.