test
Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • Mo0nlight Moderator
    #1049982

    Hi in the case of your site.

    You can edit the file :
    plugins/jamegafilter/content/helper.php
    Find the code:

    case 'calendar' :
        $this->attr['ct'.$field->id]['value'][] = strtotime($field->value);
        $this->attr['ct'.$field->id]['frontend_value'][] =strtotime($field->value);

    You can edit the line:

    $this->attr['ct'.$field->id]['frontend_value'][] =strtotime($field->value);

    To something like this.

    $this->attr['ct'.$field->id]['frontend_value'][] = ($field->value);

    Or

    $this->attr['ct'.$field->id]['frontend_value'][] = date("Ymd", strtotime($field->value));

    And
    You can use the code in the file product-item.php
    {attr.ct1.frontend_value}

    thesdhotel Friend
    #1050382

    Hello, Ok, finally! I don’t understand why it took one month for a simple edit like this, but this finally worked lol. Thanks.

    A few general notes:

    • So at the end of the day, there was no need for dust-intl, since you can customize the calendar field date format in the helper.php, right? I will deleted all the dust-intl files and edits that we made to use the library, since it wasn’t needed.

    • Not sure why you asked me for my ftp login of my site, if at the end, it was a simple customization of the helper.php that had nothing to do with my site…

    • You should really disable the fact that staff needs their post to be approved on this forum. It took more almost 24 HOURS after you replied, for your reply to appear in this topic. Why does the staff need to have their replies approved, but the users can post freely!? If anything, it should be the opposite lol, makes no sense. You replied over 24 hours ago but your reply didn’t appear until a few minutes ago, that is just an insane and slows dows work schedule for everybody, for you, your staff, and for all your users. Strongly suggest you to fix this.

    Anyways, we finally did it! Now I got the custom field date to show up with my desired format. Thanks!

    • This reply was modified 7 years, 5 months ago by  thesdhotel.
Viewing 2 posts - 16 through 17 (of 17 total)

This topic contains 17 replies, has 3 voices, and was last updated by  thesdhotel 7 years, 5 months ago.

The topic ‘Customize "Date Format" of a Date Custom Field in product-item layout’ is closed to new replies.