Jump to content

Currently Trending Products Carousel LOCATION SPECIFIC


MARIO AWNA

Recommended Posts

Hello. I bought recently this extension but no more help available since SemperFiWebServices  is not responding anymore.

The plugin is working but I want to define where I want to run the slider.

Currently when I turn on to show at homepage-- it slides on top of the main BX SLIDER

I want it on homepage but far below the homepage.

PLS HELP.  THANK YOU

Link to comment
Share on other sites

Were there instructions on what edits to make to the skin template content.homepage.php? Did the plugin come with sample templates?

The Homepage template has two main sections: the actual Homepage document (see admin, Documents, the document in the list with the homepage radio-button selected), and the list of Latest Products.

Outside of those two areas, placing a new slider would involve editing a different template.

 

Link to comment
Share on other sites

The instructions say to look in the main.php skin template and find {$PAGE_CONTENT} (near line 74). The instructions will have you adding this template variable placeholder code to a new line just above it:
{$SFWS_CURRENTLY_TRENDING_PRODUCTS_CAROUSEL}

For the Homepage, the contents of the template variable placeholder {$PAGE_CONTENT} contains the Homepage document and the Latest Products, as mentioned earlier.

Thus, the SFWS template variable placeholder will be above any page contents (global setting), and/or including the Homepage contents (Homepage setting).

To move the SFWS carousel to below the existing slider, but still above the Latest Products, the SFWS template variable placeholder needs to be removed from the main.php skin template and added to the content.homepage.php skin template. (See note below.)

So, in the content.homepage.php skin template, find:

</div>
{/if}
{if $LATEST_PRODUCTS}


Change to:

</div>
{/if}
{$SFWS_CURRENTLY_TRENDING_PRODUCTS_CAROUSEL}
{if $LATEST_PRODUCTS}

Note: Because this template variable placeholder is now in the content.homepage.php skin template, and because this skin template is used only when showing the Homepage, the plugin option to "Set carousel location* (global or home page only)" becomes moot. It is now Homepage Only.

* Location is the wrong word. The correct word is visibility. The option sets the carousel's visibility to global (always visible), or to home page only (only visible when CubeCart is showing the Homepage).

Link to comment
Share on other sites

My guess why -- getting the plugin's contents loaded into this skin template variable placeholder happens after the skin template content.homepage.php has already been compiled. (Once compiled, changing the contents of placeholders has no effect.)

Be back soon.

 

Link to comment
Share on other sites

According to an image of the plugin's hooks in use, the only relevant hook is class.gui.display. This hook is the last hook that gets executed.

So, as I suspect, the main content part of the final page has already been compiled.

I will explore changing the filename of the hook so that the placeholder is assigned to the template earlier.

 

Link to comment
Share on other sites

Please try this:

Within the Trending Products plugin's folder, find the file /hooks/class.gui.display.php and make a copy of that file, keeping the copy in the same /hooks/ folder but giving it the name class.cubecart.display_homepage.php.

More to come.

 

Link to comment
Share on other sites

Next, open the Trending Products plugin file config.xml. On a new blank line just after <hooks>, add:

<hook trigger="class.cubecart.display_homepage" enabled="1"><![CDATA[Copy of Display Carousel hook to show within Homepage.]]></hook>

Then, in admin, Manage Hooks, click the link that is the Trending Products plugin name.

On the next page, observe that the new hook is listed and enabled.

If the Clear Cache button is lit, be sure to click it before checking the Homepage.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...