Add a cart button to one product
14 years 8 months ago #35891
by didero
Add a cart button to one product was created by didero
Hello,
Is it possible to display one product and add a cart button to it and with the options to choose the number of items etc.? And if so how do I do it?
The idea is that I've setup a new product category with products that are for sale (on offer) during one week.
See: www.broodjes2day.nl/
It all works ok but would be nice if I could place the code in a custom module on the right so that the product that is on sale appears automatically in that module depending on the dates set on which the product is for sale.[/color]
Is it possible to display one product and add a cart button to it and with the options to choose the number of items etc.? And if so how do I do it?
The idea is that I've setup a new product category with products that are for sale (on offer) during one week.
See: www.broodjes2day.nl/
It all works ok but would be nice if I could place the code in a custom module on the right so that the product that is on sale appears automatically in that module depending on the dates set on which the product is for sale.[/color]
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35958
by nicolas
Replied by nicolas on topic Re: Add a cart button to one product
Hi,
You could create a hikashop products listing module with only one product displayed in it and with its "display add to cart" option activated.
If you also want the quantity box, you will have to edit the view file of the listing of products in order to activate it:
www.hikashop.com/en/support/forum/4-how-...t-listing.html#24537
You could create a hikashop products listing module with only one product displayed in it and with its "display add to cart" option activated.
If you also want the quantity box, you will have to edit the view file of the listing of products in order to activate it:
www.hikashop.com/en/support/forum/4-how-...t-listing.html#24537
Please Log in or Create an account to join the conversation.
14 years 8 months ago #36023
by didero
Replied by didero on topic Re: Add a cart button to one product
Thank you,
When I would follow your suggestion is the active product e.g. the product in that category that is actually for sale automatically selected? I guess not. Or would it be possible that the extra cart appears only when the offer is valid?
At this moment there are two products for sale, one available the 24th January and the other per the 30th of January. More will follow for each new week. So there is always one offer only.
Might this be an extra option to consider for your team:
Assume I want to make a scheme for special offers for a whole year.
In that case all those offers are already visible to the competitors with the remark that the product will be for sale on .... Unfortunately the price is also already visible.
So would be nice if you could think of an extra date option to have those products only visible on the dates (or a few days in front) on which they can be bought.
When I would follow your suggestion is the active product e.g. the product in that category that is actually for sale automatically selected? I guess not. Or would it be possible that the extra cart appears only when the offer is valid?
At this moment there are two products for sale, one available the 24th January and the other per the 30th of January. More will follow for each new week. So there is always one offer only.
Might this be an extra option to consider for your team:
Assume I want to make a scheme for special offers for a whole year.
In that case all those offers are already visible to the competitors with the remark that the product will be for sale on .... Unfortunately the price is also already visible.
So would be nice if you could think of an extra date option to have those products only visible on the dates (or a few days in front) on which they can be bought.
Please Log in or Create an account to join the conversation.
14 years 8 months ago #36062
by nicolas
Replied by nicolas on topic Re: Add a cart button to one product
Indeed, you would have to publish/unpublish the products so that the correct one is displayed in the listing.
If you want to do that automatically based on the sale dates of the products, you would actually have to create a hikashop plugin implementing the onBeforeProductListingLoad(&$filters) event as explained in our developer documentation.
That feature request added to our todo list.
If you want to do that automatically based on the sale dates of the products, you would actually have to create a hikashop plugin implementing the onBeforeProductListingLoad(&$filters) event as explained in our developer documentation.
That feature request added to our todo list.
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds