- Posts: 9
- Thank you received: 0
A couple questions
A couple questions:
1. how can I change the view order in places other than checkout - for example how to place the product name above the price on the product listing page.
2. how can I change the size of the image on the product page - I would like the thumbnail size (in category/product listing pages) to stay as is but the image on the actual product page to be bigger, and the small image previews to be bigger too.
3. Image order - is there a way to reorder a products images?
Thanks!
Please Log in or Create an account to join the conversation.
2. You can edit the CSS of HikaShop for that. Go in the configuration, under the tab display. And edit the front end CSS. There you can change the height in the class definition below in order to change the size of the small thumbnails.
3. No, you will have to delete them and upload them in the good order.
Please Log in or Create an account to join the conversation.
One other question: do you know the best way to go about using a plugin in a 3rd party app? is this possible? Ive looked around and havent found much info on it. Artplugin says it does it but it did not seem to work, and I dont want to use articles anywhere because I would have to create a new article for each product which would not be good for my clients.
Thanks!
Please Log in or Create an account to join the conversation.
If they can replace tags anywhere in the page, then it will work without using tricks like articles anywhere.
It depends on the developer of the plugin.
Now, we could always look at adding an option in hikashop to trigger the content plugins on the description of the products...
Please Log in or Create an account to join the conversation.
My thought was that, assuming a normal content plugin tag would work in the code of the product page (show.php) one could set it something like:
{gallery}<?php echo $this->element->product_name;?>{/gallery}
then, all one would have to do would be to create a folder within the root specified in the image gallery plugin with the name of the product and the images would be called up using all the display parameters set in the image gallery plugin.
would this be very hard to implement?
or another option might be to try and make the image gallery a systemwide plugin rather than only a content plugin. would that be easier?
Please Log in or Create an account to join the conversation.
forum.joomla.org/viewtopic.php?f=304&t=490480
run something like that just before the output on the product page?
Please Log in or Create an account to join the conversation.
Basically, change its group from content to system and implement that function:
Also, you might have to tweak the code of the onPrepareContent function if the plugin adds javascript to the page and add the javascript directly in the constructor of the class.
In any case, the developer of the plugin will know better what to do with his own plugin than us
Also,
You can look at that page: www.hikashop.com/en/hikashop/essential.html
We use the module ninja shadowbox and basically, you just have to add some information in your normal img tags in the product description and the image slideshow is generated automatically by the module:
Please Log in or Create an account to join the conversation.
I used the following code to get the image gallery plugin called with the product name as the gallery folder name:
<div id="sigpro_hikashop_div">
<?php
$gallery = "{gallery}";
$endgallery = "{/gallery}";
$productimggallery = $this->element->product_name;
?>
<?php echo JHTML::_('content.prepare', $gallery.$productimggallery.$endgallery);?>
</div>
works like a charm, only problem is i need the name to populate as the normal product name, not the name with the variant attached. this is because I want to call the same pictures no matter what the variant, and because my variants are lengths and they have inch marks ( " ) in them and that seems to mess everything up.
can you tell me what to replace $this->element->product_name with to get the original product name?
I tried $this->row->product_name but it didnt work.
Thanks!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
<div id="sigpro_hikashop_div">
<?php
$gallery = "{gallery}";
$endgallery = "{/gallery}";
$productimggallery = $this->element->main->product_name;
?>
<?php echo JHTML::_('content.prepare', $gallery.$productimggallery.$endgallery);?>
</div>
shows up just as
with an error from the image gallery plugin.
any ideas?
Thanks again for all your help with this! Im so close... just this little tweak and I will be set.
Please Log in or Create an account to join the conversation.
Otherwise, it will be $this->element->product_name;
I checked on my end just to be sure and I can confirm you that $this->element->main->product_name; return the name of the main product on the product page when the product has variants.
Please Log in or Create an account to join the conversation.
Only problem is that now it wont work for products that dont have variants and I will need it to work for both.
I will try writing an if then statement to pull the different variable depending on if the product has variants or not, but i figure this might take me some time so if you have a minute and feel like helping out with it that would be awesome.
Please Log in or Create an account to join the conversation.
Then, you can use $name in your tag.
Please Log in or Create an account to join the conversation.
for anyone out there that is trying to do something similar, here is the final code:
How to add simple image gallery to the hikashop product page:
Code:
<div id="sigpro_hikashop_div">
<?php
$gallery = "{gallery}";
$endgallery = "{/gallery}";
if(!empty($this->element->main->product_name)){
$name = $this->element->main->product_name;
}else{
$name = $this->element->product_name;
}
$imgfolder = str_replace(" ","_",$name);
?>
<?php echo JHTML::_('content.prepare', $gallery.$imgfolder.$endgallery);?>
</div>
to implement:
1. install simple image gallery pro from the JED and set the image folder to something like: images/stories/products
2. place the above code whereever you would like on your product view page (com_hikashop/views/product/tmpl/show.php)
3. within images/stories/products (or whereever your image path is set) create a folder for each product with the name of the product (replacing any spaces in the product name with underscores)
4. the images will be displayed by sigpro right within the hikashop product page
this gives you much more flexibility with how the images are displayed by using the options in the sigpro plugin parameters, and your lightbox popup will have a nice slideshow.
ive attached a pic of my final product page for example.
enjoy!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.