Manage Variants

  • Posts: 48
  • Thank you received: 1
12 years 4 months ago #58308

when I have a number of diff variants with various end dates (start dates also possible) would like to see Product available from (startdate) and Product available until (enddate) selection featured on the indiv variant (accessing from "Manage variants")edit screen

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #58376

You can add the code

<td align="center">
						<?php echo hikashop_getDate($row->product_sale_start); ?>
					</td>
					<td align="center">
						<?php echo hikashop_getDate($row->product_sale_end); ?>
					</td>
before the code
<td>
									<?php echo $this->currencyHelper->displayPrices(@$row->prices); ?>
								</td>
and the code
							<th class="title">
								<?php echo JText::_('PRODUCT_SALE_START'); ?>
							</th>
							<th class="title">
								<?php echo JText::_('PRODUCT_SALE_END'); ?>
							</th>
before the code
							<th class="title">
								<?php echo JText::_('PRODUCT_PRICE'); ?>
							</th>
in the file "variant" of the view "product" via Display->Views for your back end template.

Last edit: 12 years 4 months ago by nicolas.

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

  • Posts: 48
  • Thank you received: 1
12 years 4 months ago #58399

located the file of the back end template, product / variant.php
but am unable to locate the last "before the code" commands in the file.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 4 months ago #58440

I fixed my message. The last two code pieces were inverted

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

  • Posts: 48
  • Thank you received: 1
12 years 4 months ago #58543

:woohoo: Thank you so much, as you can see on the img file the Varant Listing page now has the columns




But I need to enter data for the Start and Stop Dates and do not have the selection on the Indiv variant page, see attached img

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #58601

Oh, I thought that you meant that it was there and that you just wanted to display the value on the listing.

Adding the field in the form in not complex either.
You can just add the code

<tr>
					<td class="key">
						<label for="data[product][product_sale_start]">
							<?php echo JText::_( 'PRODUCT_SALE_START' ); ?>
						</label>
					</td>
					<td>
						<?php echo JHTML::_('calendar', hikashop_getDate((@$this->element->product_sale_start?@$this->element->product_sale_start:''),'%Y-%m-%d %H:%M'), 'data[product][product_sale_start]','product_sale_start','%Y-%m-%d %H:%M','size="20"'); ?>
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="data[product][product_sale_end]">
							<?php echo JText::_( 'PRODUCT_SALE_END' ); ?>
						</label>
					</td>
					<td>
						<?php echo JHTML::_('calendar', hikashop_getDate((@$this->element->product_sale_end?@$this->element->product_sale_end:''),'%Y-%m-%d %H:%M'), 'data[product][product_sale_end]','product_sale_end','%Y-%m-%d %H:%M','size="20"'); ?>
					</td>
				</tr>
in the file infovariant.
However, the values won't be used anywhere. It would require to modify core files of HikaShop to handle the check of these values (in the quantity file of the product view, in the file administrator/components/com_hikashop/classes/cart.php )

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

  • Posts: 48
  • Thank you received: 1
12 years 3 months ago #58977

OK, now getting to the my initial request, would require the values being used. As this requires modification of core files could you plaese add it to the many other (more important) work you are doing for inclusion in one of the next update.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 3 months ago #59006

We'll add that for next version

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

Time to create page: 0.079 seconds
Powered by Kunena Forum