A couple questions

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2421

First, thanks for this great component! I have used virtuemart in the past and hated it, this is soooo much better. thanks! Ill probably be purchasing the pay version too.

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2423

1. There is no option directly in the configuration. However, you can easily edit the code to swap elements of the views. Go to the menu Display->Views and search for "listing_img". You should see several files of the view product which you can edit to swap the display of products in product listings. The exact file will depend on the option "Type of item layout" in your module/menu

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.

div#hikashop_product_left_part img.hikashop_child_image{
	margin : 2px;
	height:25px;
}

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.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2432

Thanks for the quick answers!

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2433

It depends how the plugins are made. If they are made to only process articles content, then that's what they will do.
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.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2434

Yes, this is what I was thinking. I wanted to use simple image gallery to display pictures for the products, since that way my client and I would be able to easily reorder images, control the display of images more easily, and have them appear in a lightbox with slideshow mode.

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.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2436

Im not much of an actual programmer, but maybe this could be helpful:

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2437

It would definitely be easier to transform the plugin.
Basically, change its group from content to system and implement that function:

function onAfterRender(){
$body = JResponse::getBody();
$art = new stdClass();
$art->title = '';
$art->introtext = $body;
$art->fulltext = $body;
$art->text = $body;
$art->attribs = '';
$art->state=1;
$art->created_by=62;
$art->images = '';
$art->id = 0;
$art->section = 0;
$art->catid = 0;
$paramsContent =& JComponentHelper::getParams('com_content');
$this->onPrepareContent($art, $paramsContent, 0);
JResponse::setBody($art->text);
}
Supposing that the plugin is build as a class...
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:
<a href="media/slider/1_dashboard.png" title="Statistics" rel="shadowbox[hikashop]"><img class="imgthumb" src="media/slider/1_dashboard.png" border="0" alt="Statistics" width="163" height="80" /></a><a href="media/slider/2_checkout.png" title="Customizable checkout" rel="shadowbox[hikashop]"><img class="imgthumb" src="media/slider/2_checkout.png" border="0" alt="Customizable checkout" width="144" height="80" /></a><a href="media/slider/4_product.png" title="Multi lingual edition" rel="shadowbox[hikashop]"><img class="imgthumb" src="media/slider/4_product.png" border="0" alt="Multi lingual edition" width="143" height="80" /></a>

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2442

I figured it out! Just need one little thing from you to make it perfect.

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2444

It's

$this->element->main->product_name;

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2446

hmmm... that doesnt seem to return anything at all... this is the current code:

<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

{gallery}{/gallery}

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.

Last edit: 13 years 11 months ago by shazzmere.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2447

That should be the code if the product has variants.
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.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2448

perfect. your right, I was testing it on a product that didnt have variants added yet.

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2449

if(!empty($this->element->main->product_name)){
$name = $this->element->main->product_name;
}else{
$name = $this->element->product_name;
}

Then, you can use $name in your tag.

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2450

perfect. you are the man. thanks so much. I also added a line to replace spaces in product names with underscores so sigpro could find the folders for products with spaces.

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!


Attachments:
Last edit: 13 years 11 months ago by shazzmere.

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
13 years 11 months ago #2451

And thanks again to Nicolas. definitely the best support ever. seriously. I owe you a beer.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #2455

Thank you for posting your solution. I'm sure it will help other users.

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum