Show Add to Cart Button on Categories Listing

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #188641

-- url of the page with the problem -- : blade550xupgrades.com
-- HikaShop version -- : Starter: 2.3.5
-- Joomla version -- : 2.5.19
-- Browser(s) name and version -- : Firefox 35.0
-- Error-message(debug-mod must be tuned on) -- : No error message

I've spent a while researching this, and it looks like it ought to be a straightforward solution. But nothing I've found has gotten me what I need.

I have a new menu item set up as a HikaShop Categories Listing, which lists the products in a single category. That works great. I have it set to show 20 items per page in 2 columns. Also working fine.

Under each product is a button for "Choose Options" because each product is available in many colors. In addition to the Choose Options button, I also need an "Add to Cart" button and quantity selector so that shoppers can bypass the product description page and add items directly to their cart. But I can't figure out to get this to work.

I have gone into Display >> Content Menus for the menu in question and made sure that "Display 'Add to cart' button" and "Quantity field on 'Add to cart' button" are both set to Yes. Is there something else I need to do?

There is probably a simple solution, but I'm still new to HikaShop and this really has me stumped!

I should point point out that the menu item I'm working on is set to Registered Only for the time being because this is a live site and I don't want visitors to see it yet. If someone needs to take a look at it, let me know and I'll set you up with an account.

Last edit: 10 years 3 months ago by CreativeProStudio.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #188703

Hello,
You have a "Choose Options" button because your product have a characteristic or custom field to select, so the only solution will b to use a product without any variant/custom field OR to use the link of the "Add to cart HTML link" button on your variant configuration page and add it on your product description, so that your user will be able to directly add that variant through your product listing (if you display your product description on it).

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

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #188753

I'm currently not showing the product description in the category listing - only the name, photo, and price. The description is too long to include here.

So there's not a way to do what I need?

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

  • Posts: 83858
  • Thank you received: 13577
  • MODERATOR
10 years 3 months ago #188765

Hi,

As Xavier said, if you want an add to cart button for your products on the products listings, you need to have products without characteristics as the characteristic selection requires the customer to go on the product page to first choose the characteristic before adding the product to the cart. That's why the system automatically changes the "add to cart" button to "choose options" on listings.
So if you want both characteristics to your products and add to cart buttons on the products listing for them, then yes, there is no way to do that.
One alternative I can propose is to use a custom field of the table "item" (Business edition) for the color selector. If you don't need price change or quantity change for different colors of the same product, that could be a solution as the custom item fields can be displayed on the listings and in that case you would get the add to cart button on the listings.

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

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #188948

Ah, thank you for that explanation - that makes perfect sense!

The different color options do not affect the price.

Is there a way to add the color selector to the products listing along with the Add to Cart button? In other words, can I duplicate the color selection, quantity selection, and add to cart from the product page and put them on the products listing? That would solve the problem of having to select a color before adding an item to the cart, AND would let me have the Add to Cart button on the products listing.

Please see the attached image - this is the color selector, quantity selector, and add to cart button from the product page. Is there a way to grab this bit of code and somehow insert it into the products listing?

Attachments:

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

  • Posts: 83858
  • Thank you received: 13577
  • MODERATOR
10 years 3 months ago #188992

Yes. Here is the procedure to do that:

1. Create a custom field of the table "item" via the menu Display>Custom fields for your color selector.
2. Edit your products listing menu via the menu Display>Content menus and turn on the "Display custom item fields" and the "Display 'Add to cart' button" options there.
3. Add the line :
<?php $this->params->set('show_quantity_field',1); ?>
at the beginning of the "listing" file of the "product" view via the menu Display>Views in order to add the quantity field on the listing.

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

  • Posts: 33
  • Thank you received: 0
10 years 3 months ago #189420

Hi nicolas,

I just want to start off by saying how much I'm liking HikaShop. I've been developing for VirtueMart for several years, and this is SO MUCH better. I never really liked working in VM, and now after getting familiar with HIkaShop, I'll probably never go back to it.

One of the things I like is how much easier it is to make customizations - nothing is hidden! But having said that, I am still learning my way around and am a little confused by the instructions to include an Add to Cart button on my products listing pages. I'm stuck on step #1. I go into Display>Custom Fields, but don't see how to create a new custom field for the color selector. Could you please elaborate on that step?

Thanks!

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

  • Posts: 83858
  • Thank you received: 13577
  • MODERATOR
10 years 3 months ago #189425

Hi,

Thank you for your message !
I didn't mention it but custom fields of the table "item" are only available with the Business edition of HikaShop.
You just need to click on the "new" button of the menu Display->Custom fields in order to be able to create a new field but the "type" field is blocked to "address" if you're using the Starter edition.

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

Time to create page: 0.087 seconds
Powered by Kunena Forum