Gallery View with Products

  • Posts: 158
  • Thank you received: 6
12 years 3 months ago #58966

Hello,

I've almost finished the website for Sandy King using Hikashop and the client is requesting that there be an option to move through the products via a forward and back button so the user of the website does not have to go "back" to the category view to see the next photograph. Here's an example that he gave me which allows you to move through the different products and then click the link "Purchase this print" to take you to the product page: www.michael-gordon.com/photo.php?id=35&gallery=desert . Is anything like that available with Hikashop? If not, would there be a way to simply add a "See the next photograph in this category" button - like a pagination?

Here's the test site: king.artisanwebandprint.com

Thanks,

Dawn

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 3 months ago #59004

You can turn on the option "Show shortcuts to other category products" of the configuration for that.

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

  • Posts: 158
  • Thank you received: 6
12 years 3 months ago #59322

Hi,

Thanks for the recommendation, this is exactly what I'm looking for. I have now turned on the buttons and they seem to move through the products in some categories and not on others. For example, when I go to the Canada gallery, king.artisanwebandprint.com/photography-...s/135-barn-joinery-2 and use the "next product" it advances, but in China, king.artisanwebandprint.com/photography-...7-yungang-grottoes-2 it does not.

Any ideas?

Dawn

king.artisanwebandprint.com

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 3 months ago #59404

Can you try to change the line:
$filters = array('b.product_published=1','a.category_id = '.$category_id);

to:
$filters = array('b.product_published=1','a.category_id = '.$category_id,'b.product_type=\'main\'');

or the line:
$n = $k + 1;

to:
$n = $k;
while(isset($articles[$n]) && $articles[$n]==$element->product_id){
$n = $k + 1;
}

in the file components/com_hikashop/views/product/view.html.php and see if that helps ?

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

  • Posts: 158
  • Thank you received: 6
12 years 3 months ago #59418

Hello,

The first line of code at first seemed to get the Previous/Next buttons working better by advancing the page from one product to the next without having to view every variant, except it broke the product category tree structure/directory. So when I click on the Spanish gallery and open the first photograph, then click next, I get the next photograph only it's a China (different category) based photograph - strangely, it says that this China based photograph is in the Spain gallery - it is not, I double checked in the products section in the backend. Naturally, I would like to see the next product in the same category listing.

I think the initial problem of it getting stuck on one product or only going between one or two products is stemming from the fact that each product has variants, namely the photograph size and print type. So the previous and next will scroll through all of the same photographs variants before proceeding to the next photograph. I don't think many people would want to look at every single variant of a product before seeing the next; rather, I would like the ability to move through each product in a particular category as if I'm window shopping.

I've left the 1st code change that you recommended intact so you can see how it works. Here's a screencast of the Spain gallery photos so you can compare my results: screencast.com/t/TvsZ83issq/ I also tried the second code change and it's didn't seem to do anything. I wasn't totally clear of whether I applied that properly (sorry, I don't write PHP only CSS and HTML), so I reverted back to the original.

Thanks for all,

Dawn

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 3 months ago #59512

Normally, that should never happen. Variants are not attached to any category, you should cannot technically get that result, unless you have variants attached to categories in the database because, for example you would have done some screwed CSV imports.
So that bug is not really a bug but comes from the fact that the data in the database is not correct.
That's also why we don't have the problem on our end and why I'm hitting in the dark here asking you to try some code change...

Unfortunately, I don't have other ideas. I would need to debug directly on your website with an FTP account in order to understand what is happening.

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

  • Posts: 158
  • Thank you received: 6
12 years 3 months ago #59513

Thanks Nicolas for the explanation. I am sending you the FTP access to the website in a private message. I have made a backup.

Best,

Dawn

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 3 months ago #59567

Looking at the website, I think that there is a problem with the ordering of the products on your website.
Could you also give a back end access to the website ?

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

  • Posts: 158
  • Thank you received: 6
12 years 3 months ago #59981

hello,

I am sending backend access now.

Thanks,

Dawn

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 3 months ago #60078

There was indeed some problems with the orderings.

So it's working now.
You just have to make sure that the first category of your products is the main category. I've done it for the products of the canada category and it's working fine for them now.

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

  • Posts: 158
  • Thank you received: 6
12 years 3 months ago #60109

Thanks Nicolas that solved the problem.

So to clarify for those who are reading this post on using the product next and previous buttons. For the next/previous scrolling to work and if your products are placed in more that one category, you must make most important category be listed as first in the product page (admin section).

So for example, my primary organizational structure is the "Place" where the photographs were taken: China, Spain, Mexico. Secondary categories included the type of prints available, IE: carbon or pizeography. When looking at the front end, the previous and next buttons were scrolling through what looked like the variants (ie: pizeography in a 5 x 7 then pizeography in a 10 x 16") but in reality it was just scrolling through the Products that had Pizeography listed as the first category in the product page. I've gone in and updated all products so the "Place" category is always first and it's working brilliantly now.

The final site will be here:
www.sandykingphotography.com
for now it is at:
king.artisanwebandprint.com

Best,

Dawn

Last edit: 12 years 3 months ago by artisanwebandprint.
The following user(s) said Thank You: nicolas

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

  • Posts: 158
  • Thank you received: 6
12 years 1 month ago #67439

Hi Nicolas,

Just thought I'd give you an update. I have gone through every product and made sure that the 1st category listed is the primary category for the photographs to ensure that the galleries which are the 1st category (Spain, Mexico, China, ETC) only show the proper photographs. This has fixed 4 of the 7 galleries. I can't seem to figure out what is causing the problem so I'll give you a detailed description here.

king.artisanwebandprint.com

Gallery: Experimental Light. - Under Portfolios

Go to the last image in the listing, page 3: Ossabaw Island #1. Open the photograph to enter the product page and use the upper right hand arrow to move forward in the preview. This should advance to the 1st image in the Experimental Light Portfolio, instead I see Horse Pasture River. Here is a screenshot of the categories for Horse Pasture River: screencast.com/t/5bCgjumkF9 As you can see the Portfolio "Carolina Rock & Waters" is first and there is no mention of "Experimental Light" Why would this show up in the experiment light gallery is beyond me. If I remove the second two categories, it still shows up under experimental light. From this screenshot of the Experimental Light gallery you can see that Horse Pasture River is not there screencast.com/t/WhKC7nbDVn4U .

We are ready to launch this site with the exception of this one bug. Some clarity on this would be most appreciated.

Also, I am still running on the last version of Hikashop. We have updated some of the display views php to change how the product page shows the thumbnails (ie no thumbnails, but two images (a square one for the category pages and the regular view for the product page). Is there anything I should know before updating so I don't lose these changes?

Thanks,

Dawn

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 1 month ago #67665

Hi,

When I click on the "previous" button of the "Ossabaw Island #1" product, I go to the product "CHICHEN ITZA #1" which is the previous product on the listing of products. And the next/previous buttons work fine on that other product too.
king.artisanwebandprint.com/photography-.../category_pathway-24

So It's ok for me.

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

  • Posts: 158
  • Thank you received: 6
12 years 1 month ago #67794

Hi Nicolas,

This is true when you access the experimental light gallery from the "Portfolios" menu item then click on the image/title for experimental light in the component area; however, if you use the dropdown menu and click directly on experimental light you'll see the next arrow appears for Ossabow Island and it advances to photographs that are not in the portfolio. Check out this short video: screencast.com/t/QzecMBAvo8P

Thanks,

Dawn

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 1 month ago #67917

Hi,

Same problem as before.
The first category of the product "Ossabow Island" was not "Experimental Light".
I've changed that and it's working fine for both menus now.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum