Storebox - Can I assign a custom layout to a modal window?

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Tue Jun 17, 2014 11:47 pm
I am using storebox and a custom layout to build a Hikashop store.

I am building a feature called a "quickshop". Essentially, any product that has attributes such as small, medium, large , cannot be placed in the cart without first choosing the attribute. Other products can be placed in the cart directly from the category view but in Hikashop products with attributes instead of "Add to cart" have a button called "Choose Options".

The job consists of making that link open in a modal window (which I already implemented) displaying only the component and maybe a couple of positions necessary for a script we are using.
The problem with that is that the modal window is loading absolutely no JS or CSS of any sort.

What I would like to do is to either make the modal window load a separate Custom Layout from the storebox, but I don't know how to accomplish that. I know how to assign layouts to menu items, but these are product displays from hikashop, and not even all of them, just the ones with attributes in them.

I am hoping there is some switch I can use in the URL or at least some javascript that can solve this problem.

Thank you.
User avatar
Junior Boarder

GK User
Wed Jun 18, 2014 8:48 am
If you load component view inside modal it will use this file from template » root/templates/gk_storebox/component.php which in fact don't load default styles. If you want to include custom CSS you should add proper line here like we did for example with vmframe.css file.
User avatar
Platinum Boarder

GK User
Wed Jun 18, 2014 7:02 pm
I am sorry, but I found the explanation really hard to understand. I am not sure what vmframe.css is or what it means.

The link we use to generate the modal window looks like this:

Code: Select all
<a href="index.php?option=com_hikashop&amp;ctrl=product&amp;task=show&amp;product_id=212&amp;name=arch-hoodie-grey&amp;Itemid=110" rel="{handler: 'iframe', size: {x: 900, y: 700}}" class="modal">Quick Shop</a>


Is there a way in that link to specify a custom layout to load?
Is there another way to specify loading the layout in the modal window?
User avatar
Junior Boarder

GK User
Wed Jun 18, 2014 7:54 pm
Hmm… as I can see you even don't use VirtueMart but hikashop extension. The modal URL is generated by component and it is nothing related with the template. The only way is to hack core extension files but more help you can get on HikaShop forum.
User avatar
Platinum Boarder

GK User
Wed Jun 18, 2014 8:56 pm
I found a way to assign the right layout by changing the link itemID and making it unique. I just tested it and it works, my partner is trying to implement it and also edit a copy of my custom layout so it does not carry headers, footers and unnecessary position (but it needs to carry a couple of positions used by a zoom effect I am using on the product images).

I was able to test this by assigning the "facebook" layout to id=1001 and them with Firebug I manually altered the itemID in the link to 1001 . Now my programmer is trying to make that itemID a constant for all modal windows links in that area.

Hopefully it will work and given some time I'll document it here a bit better.

Thank you for trying.
User avatar
Junior Boarder

GK User
Sat Jun 21, 2014 9:35 pm
Thanks for sharing your solution, probably using Joomla API it is a way to detect whether it is kind of raw view like pop-up or full template load and then assign some custom styles for this view but your solution looks also correct.
User avatar
Platinum Boarder


cron