Note that there are some explanatory texts on larger screens.

plurals
  1. POStart using time for product (License type)
    primarykey
    data
    text
    <p>In checkout cart mornitor, i added a datepicker for earch product in cart to allow cusommer selecting start using date (within 1 month from now). I want to save this datepicker to onepage when click place-order. It will save to order. I already create attribute in eav_attribute. In config.xml i use this code:</p> <pre><code>&lt;events&gt; &lt;controller_action_predispatch_checkout_cart_index &gt; &lt;observers&gt; &lt;licensetime_observer&gt; &lt;class&gt;licensetime/observer&lt;/class&gt; &lt;method&gt;saveLicensetime&lt;/method&gt; &lt;/licensetime_observer&gt; &lt;/observers&gt; &lt;/controller_action_predispatch_checkout_cart_index&gt; &lt;/events&gt; </code></pre> <p>And observer i was try to var_dump but start_date is null</p> <pre><code>public function saveLicensetime($observer) { $event = $observer-&gt;getEvent(); $product = $event-&gt;getProduct(); $quote = Mage::getSingleton('checkout/type_onepage')-&gt;getQuote(); $licenseStartDate = $quote-&gt;getLicense_start_date(); if (!$licenseStartDate) { $licenseStartDate = date ("Y-m-d H:i:s", floor(time()/86400)*86400); } //var_dump($quote); die("aaaaaaaaaaa"); } </code></pre> <p>In cart/item/defaul.phtml datepicker code:</p> <pre><code>&lt;label for="license_start_date"&gt;&lt;?php echo $this-&gt;__('Start Date') ?&gt; :&lt;/label&gt; &lt;input name="cart[&lt;?php echo $_item-&gt;getId() ?&gt;][license_start_date]" readonly="true" id="license_start_date&lt;?php echo $_item-&gt;getProductId(); ?&gt;" value="&lt;?php echo $this-&gt;getLicenseStartTime($_item-&gt;getId()) ?&gt;" class="date-picker" /&gt; &lt;label for="license_end_date"&gt;&lt;?php echo $this-&gt;__('End Date') ?&gt; :&lt;/label&gt; &lt;input readonly="true" name="cart[&lt;?php echo $_item-&gt;getId() ?&gt;][license_end_date]" id="license_end_date&lt;?php echo $_item-&gt;getProductId(); ?&gt;" value="&lt;?php echo $this-&gt;getLicenseEndTime($_item-&gt;getId()) ?&gt;"&gt;&lt;/input&gt; </code></pre> <p>I'm trying this article but no luck!</p> <blockquote> <p><a href="https://stackoverflow.com/questions/9334115/magento-change-custom-option-value-before-adding-it-to-cart">Magento change Custom Option value before adding it to cart</a></p> </blockquote> <p>Sorry, my E not well!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload