- Posts: 48
- Thank you received: 1
Manage Variants
14 years 2 months ago #58308
by SLLLC
Manage Variants was created by SLLLC
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.
14 years 2 months ago - 14 years 2 months ago #58376
by nicolas
Replied by nicolas on topic Re: Manage Variants
You can add the code
before the code
and the code
before the code
in the file "variant" of the view "product" via Display->Views for your back end template.
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>
Code:
<td>
<?php echo $this->currencyHelper->displayPrices(@$row->prices); ?>
</td>
Code:
<th class="title">
<?php echo JText::_('PRODUCT_SALE_START'); ?>
</th>
<th class="title">
<?php echo JText::_('PRODUCT_SALE_END'); ?>
</th>
Code:
<th class="title">
<?php echo JText::_('PRODUCT_PRICE'); ?>
</th>
Last edit: 14 years 2 months ago by nicolas.
Please Log in or Create an account to join the conversation.
14 years 2 months ago #58399
by SLLLC
Replied by SLLLC on topic Re: Manage Variants
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.
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.
14 years 2 months ago #58440
by nicolas
Replied by nicolas on topic Re: Manage Variants
I fixed my message. The last two code pieces were inverted
Please Log in or Create an account to join the conversation.
14 years 2 months ago #58543
by SLLLC
Replied by SLLLC on topic Re: Manage Variants
Please Log in or Create an account to join the conversation.
14 years 2 months ago #58601
by nicolas
Replied by nicolas on topic Re: Manage Variants
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
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 )
Adding the field in the form in not complex either.
You can just add the code
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>
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.
14 years 2 months ago #58977
by SLLLC
Replied by SLLLC on topic Re: Manage Variants
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.
14 years 2 months ago #59006
by nicolas
Replied by nicolas on topic Re: Manage Variants
We'll add that for next version
Please Log in or Create an account to join the conversation.
Time to create page: 0.191 seconds