X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   How to change Add Date field for a Product (https://forum.x-cart.com/showthread.php?t=63608)

Pher9999 03-02-2015 08:58 AM

Re: How to change Add Date field for a Product
 
I know this is an older thread but It still works in 4.6.6. I have an issue that popped up.

When modifying the date for several products. it works great. When the customer goes to view the product lists it shows them in date order then alphabetical. Which my providers complain about since it messes with the order they want to see stuff listed. Now to fix this we need to use the time portion of the timestamps. I've tried to modify this to use the time but I'm getting lost and don't want to mess too much. Can nyone help with this? Either by adding a second field on the modify page to take a time to help with the sort in the end.

Mick 08-05-2017 04:54 AM

Re: How to change Add Date field for a Product
 
This thread is a little old but the method still works on 4.78! The only issue is that the multi-edit is not supported but adding an extra line like so rectifies even this. A must have mod for those users with Hot Products or New Arrivals.

Code change on main/product_details.tpl
Code:

<tr>
  {* New Line Here *}
  {if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[add_date]" /></td>{/if}

  <td class="FormButton" nowrap="nowrap">{$lng.lbl_date_added}:</td> 
  <td class="ProductDetails">
    {include file="main/datepicker.tpl" name="add_date" date=$product.add_date}
  </td>
</tr>


A thank-you for the original post by ADDISON :D/ :D/


All times are GMT -8. The time now is 11:59 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.