Membership item with custom fields

  • Posts: 6
  • Thank you received: 0
12 years 3 months ago #59744

I am trying to implement a membership item that contains custom fields, so that that a single item purchased specifies the name and contact information associated with the member. I would like to make it possible for a user to purchase more that one membership per order but retain the information for each membership purchased (i.e. memberships for other family members on the same order).
I have two questions:
- I purchased Hikashop Essential but do I need the Business version to implement the fields?
- Where can you set the quantity of an item so that it only allows one item at a time? The parameter "Maximum quantity per order" does not seem appropriate.

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #59800

If you want to add fields on the product page of the front end so that the user can enter the information for each product in his order, you will have to create custom fields of the table "item" which are only in the Business edition yes.

The simplest is to change the option "Display the quantity field on the product page" to "no input" in the Display tab of the configuration. That will remove the + and - links and the input box from next to the add to cart button.

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

  • Posts: 6
  • Thank you received: 0
12 years 3 months ago #59813

As I understand it the option "Display the quantity field on the product page" to "no input" applies to the entire shop, so this will force all other items to be ordered the same way.
Is there another approach that would allow this to be set on a per item basis?

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

  • Posts: 6
  • Thank you received: 0
12 years 3 months ago #59814

Also the option "Display the quantity field on the product page" to "no input" does not seem to affect the checkout screen that shows a quantity box that can be incremented.

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #59867

There is no option on a per product basis.
You would have to edit the "quantity" file of the view "product" via the menu Display->views in order to display or not the input with some custom code.

For the cart, it's the file "cart" of the view "checkout" that you need to change in a similar maner.

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

  • Posts: 6
  • Thank you received: 0
12 years 3 months ago #59938

This is disappointing, I will have to use Virtuemart instead of Hikashop, which does have per product options on the quantity selection.
I missed the 30 refund period by a few days, is there any chance I can get a refund on the Essential package? We are a nonprofit Parent teacher association for a middle school and we all work on the website as volunteers so the money means a lot to us.

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #60047

You can do that quite easily though...
just create a custom field of the table "product" and with two values: 0 and 1

Then add that line in the quantity file after the first <?php tag:
$this->params->set('show_quantity_field',$this->row->CUSTOM_FIELD_COLUMN);

where CUSTOM_FIELD_COLUMN is the column name of the product and the quantity filed will be displayed on the product page/lisitngs based on the value of the custom field in each product.

We unfortunately cannot refund past the 30 days period.

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

  • Posts: 6
  • Thank you received: 0
12 years 3 months ago #60074

I tried it but I don't see it working.
Maybe I didn't implement it correctly.
I assumed the Quantity file you referred to was quantity.php.

What "Field Type do you recommend I use, I tried drop-down?

I also added the PTA membership category to "Categories"

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #60132

dropdown is fine.
Can you do a screenshot of your modification and of the options of the custom field ?

Did you save the products with the correct value selected for them ?

Also, make sure that you're editing the quantity file for the correct front end template and not another one.

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

  • Posts: 6
  • Thank you received: 0
12 years 3 months ago #60135

The quantity file modified is in Views with the following selection: Front end brcms_template product quantity

The mofd was inserted as follows:
<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.8
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php
$this->params->set('show_quantity_field',$this->row->singlequantity);
if(!empty($this->row->has_options)){
echo $this->cart->displayButton(JText::_('CHOOSE_OPTIONS'),'choose_options',$this->params,hikashop_completeLink('product&task=show&product_id='.$this->row->product_id.$this->itemid),'window.location = \''.str_replace("'","\'",hikashop_completeLink('product&task=show&product_id='.$this->row->product_id.$this->itemid)).'\';return false;','');
}else{

Attachments:

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

  • Posts: 82819
  • Thank you received: 13366
  • MODERATOR
12 years 3 months ago #60221

The modification is ok. So it should work.

Note that the value is the opposite from your field name:
0 -> single quantity
1 -> multiple quantity

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

Time to create page: 0.077 seconds
Powered by Kunena Forum