Custom fields on checkout page + + + SOLVED + + +

Διαγράφηκε
Από Άγνωστο

Dear Litecart support team and members,

first of all thx a lot for this genius shop system!

I would like to add 3 additional fields in checkout page as follows:

  • Renting (boolean, radio button: Yes/No)
  • If yes display 2 additional fields:
    Rent date from (date)
    Rent date to.    (date)

These 3 fields should be stored in the corresponding database table.

Could you please explain which steps/files are needed to be modified?

Kind regards

tim
Founder
Από Sweden
Μέλος από Μαΐ 2013
tim

You could set up product Options for this. See Edit Product and the tab Options.

Διαγράφηκε
Από Άγνωστο

Thx a lot Tim for your hint!

I did the following:

  • I've created an option group with a radio button and 2 options Yes/No (set Yes a default/required)
  • I assigned this option group in product>options tab to one of my products

2 problems:

  1. in Frontend I see only the radio/option "Yes"
  2. There is no possibility to add an option group with functionality "date" for the fields mentiones in my post above, namely "Rent from" and "Rent to" as date.

Any idea how to solve these?

Regards

tim
Founder
Από Sweden
Μέλος από Μαΐ 2013
tim

You would have to use a text field as date is not a supported field.

Διαγράφηκε
Από Άγνωστο

Thx a lot. This works for me!

Διαγράφηκε
Από Άγνωστο

Sorry Tim! It was too early to be happy :-(

Similar to the old threat https://www.litecart.net/en/forums/15/errors-and-troubleshooting/11300/error-while-updating-cart I get the same error message while updating the cart:

  • I'm using Litecart 2.2.2
  • Browser FireFox
  • Product options ("Renting" (Yes/No) + 2  text fields for "Rent from" and "Rent to") created as described above.
  • If I try to add to the cart --> Error message "Error while updating cart"
  • And if I click OK then the following error message on the cart page:
    "Notice: Undefined index: price_adjust in ~/includes/library/lib_cart.inc.php (Line 240)"
  • I checked the way how to create the product options --> No error!

Any idea what could be the reason?

Merchant
Από Netherlands
Μέλος από Απρ 2015

@user7555, maybe its a better solution to make a product of a week renting a cottage. Per cottage you make a categorie and 52 weeks to rent as a product. Its real easy to copy paste products in LiteCart Give each product a stock of 1 and in settings do not show sold out products. Also gives you the opportunity to play with the seasonal price and short weeks mo-fr and long weeks including 2 weekends. And the product is not gone after being sold you can reuse it next year. Use manufacturers for regional search and product groups to the fine tune for accommodations for 4 - 8 or 10 people. Use product options for renting out bed sheets, towels, cleaning, and other services. Succes

Διαγράφηκε
Από Άγνωστο

Hi bobdrinktech,

thx a lot for your suggestion! Basically u'r right I could do this way, but:

  • I'm would like to use Litecart in form of "catalog mode" without any prices etc.
  • The products are cameras + lenses + brochures + flyers etc. which are stored in our internal / external busines warehouses (BW).
  • These products can be exchanged between the BW.
  • Exchange means: They can be shipped from one BW to an other (for ever) or they can be loaned for a time period.
  • In both cases it is important to update the stock information and the (in case of renting) the time period information for renting!

Therefore the way how I followed the hint from Tim was fine for me EXCEPT the error message which is not there if I use the online demo portal with the ducks!!!

Διαγράφηκε
Από Άγνωστο

Thx a lot bobdrinktech! It seems so that the implementation of the add-on "Warehouse" is not finished yet so I couldn't find it under "Add-ons".

Nevertheless:
If I could solve the issue with the "error while updating the cart" then I would be more than happy!

All other needed customizations can be done and fit to my requirements!

So I need an idea to solve this one error!

Διαγράφηκε
Από Άγνωστο

I don‘t give up :-)
I could reproduce the issue within the demo.litecart (you can do the same in 3 steps the same)

  • I‘ve created an option group „date from“ as input field with default text „DD.MM.YYYY“
  • Then I assigned this group in the option list from the Blue Duck
  • in front end I choosed the Blue Duck and in the detail view I added a date into the „date from“ field and pit it into the cart.
    Then exact the same error messages appear (see attachments)
Διαγράφηκε
Από Άγνωστο

The next error notice in the cart view

Διαγράφηκε
Από Άγνωστο

Changed the line 240 in /includes/library/lib_cart.inc.php as follows and it works fine now (no error message and no warnings)!


              if (!empty($matched_value)) {
                //$item['extras'] += $option['price_adjust'];
                $item['extras'] += $value['price_adjust'];
              }
              break;```

Thx a lot tim and kind regards,
Yilmaz
This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.