[SOLVED] Hint for not sellable items

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
12 years 3 months ago #58058

Hello there

I have a specific problem where I need a little bit of support. I would like to change the product page in a special way for items that are restricted and need a permit to buy. It's about a gunstore (please don't blame me... I already had some negative responses in the Virtuemart-Forums, when I tried Virtuemart :( )

The store is 100% legal but I need to change the product page, so that some Items cannot be put into the cart.

First of all, I added a new custom field to the products table by Hika-Admin-GUI. With this, I can "mark" items like guns and ammunition (they cannot be sold online).

Currently I used a "trick" that these products are not sellable: I set the quantity to zero and removed the text for the "Out-Of-Stock"-Message from the languages ini file. So there will be no "Add-to-Cart"-Button and also no message "Out-Of-Stock" (the message shall not appear, not that the customers think I'm Out-of-Stock). That worked pretty good so far, but I also sell items like Oil or Sights in the store as well (not restricted) and for these items I would like to have the "Out-of-Stock" text. As you can see, it's not so simple.

What I planned is: I just create a new product layout page and assign this new, adapted product page to the corresponding items (like guns and ammunition). I would copy the existing default page layout which is very nice and change the following things:

- Remove the "Add-to-Cart"-function
- Add a hint-text (red with a red square around it): "This product cannot be bought online! Please contact us for further information!" or something like that (please find an example in the attached pic).
- Out-of-Stock message (since I don't need a Stock for these items)

But here comes the problem(s): Where can I find the product layout files? Is there a help with the PHP-Code from the files? How, does the files work together? I can code a little bit, but not PHP and therefore, I'm helpless at the moment because I don't know where to "put the lever and pull".

Or maybe you have some better ideas, how can I solve my problem? I'm not a fan of changing or adding some own code to the store, since a later Update may be a pain, but I see not other way to do it (or do I miss something?).

For some tips and help, thank you very much.
Best regards
Mike

Attachments:
Last edit: 12 years 3 months ago by mike.

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

  • Posts: 12953
  • Thank you received: 1778
12 years 3 months ago #58063

hello,

I think that you should :

- Go to your product page
- Set the Product available from and Product available until options to a past date
- SAVE

- Go to "Hikashop->System->Configuration->Language"
- Edit the English (United Kingdom) translation file
- Change the line

ITEM_NOT_SOLD_ANYMORE="Item not sold anymore"
by
ITEM_NOT_SOLD_ANYMORE=" "

Hope this will help you.

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

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
12 years 3 months ago #58083

Thank your for that reply. It solved the problem with the Out-Of-Stock!
But the thing with the additional message ("This product cannot be sold online... etc...") is not solved. Okay, for a short fix, I could replace the text "Items not sold anymore" with my desired text. That would be a possibility!

It'll try it out... Many thanks for this first idea!

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

  • Posts: 108
  • Thank you received: 4
  • Hikashop Business
12 years 3 months ago #59048

B) SOLVED
Please refere to the following thread for how I solved this problem!

www.hikashop.com/en/forum/4-how-to/58126...ed-on-own-rules.html

Best regards
Mike

The following user(s) said Thank You: Mohamed Thelji

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

Time to create page: 0.048 seconds
Powered by Kunena Forum