News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Custom field stockable customisation and delivery management

Started by gyam, October 23, 2014, 20:02:10 PM

Previous topic - Next topic

gyam

Hi,

I got one product with 6 childs and a size custom field stockable option.
I'm looking to change the field which is called in <span class="product-field-display"><?php echo $field->display ?></span> - eg modify the <span> stuff inside. Where can I get the code building for that?

Then, as I got different stock values for the childs, I'd like to get the delivery delay pictures to follow the chosen option.
At this moment, as soon as I set the childs, custom field etc in the parent product, the picture disappears and nothing change if I choose another size... Any clue about that?

Thx for help.

jenkinhill

I've given up guess work. What versions of Joomla/VirtueMart are you using and what is the URL?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

gyam

Hi Jenkinhill,

I'm on 2.5.27, php 5.5.14. For VM, that's 2.6.10.
I send you the adress in MP as the website is under construction.

jenkinhill

I don't read PMs.

In VM2.6.12 (and older versions) the file to edit/override is components/com_virtuemart/views/productdetails/tmpl/default_customfields.php unless you already use an override for that, in which case it will be [your joomla template]/html/com_virtuemart/productdetails/default_customfields.php
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

gyam

Hi,

I found that file but to get a proper design, I have to override the "echo $field->display" within the code (mainly remove the <br>)

<div class="product-field product-field-type-E">
<span class="product-fields-title">
<strong>Taille</strong>
</span>
<span class="product-field-display">
<br>
<div id="stockableBlockIndex_1_0" class="stockable_block_1">
<input type="hidden" name="customPlugin[1][stockable][child_id]" value="2">
<script language="javascript">
<input type="hidden" name="customPrice[1][4]" value="1">
</span>
<span class="product-field-desc"></span>
</div>


then, I have to find a way to change the delivery time (and picture) following the choice. Do you think it's possible?

*edit: You can check @ http://www.petit-c.fr/index.php?piedeleurestraint=1 (to override the "under construction" stuff) then reach the page http://www.petit-c.fr/boutique-en-ligne/robes/robe-cainta-detail

gyam

Ok, for the "avaibility" issue, I went deeper in the code.
I think it's a prbl inside stockable.php (plugins/vmcustom/stockable). But at this stage, there's some javascript and I don't really know this language.

On the website, I've set all childs (and the parent too) with "3-5 days". General stock management is set to show "10days" if no more stock.
As result, I got no avaibility except if the stock is empty which show....tada....the "3-5days" image ?!?

Still no success to change the <span class="product-field-display"><?php echo $field->display ?></span>. I continue to look for the piece of code which built the "->display".