Jump to content

Muscator

Member
  • Posts

    22
  • Joined

  • Last visited

Posts posted by Muscator

  1. bsmither,geotex,

     

    Thanks for your valuable input.

     

    I have tried applying

     

    "if(!($GLOBALS['config']->get('config', 'disable_estimates')=='1')
                && $user_defined &&
                !CC_IN_ADMIN"

     

    to the END of the very long line starting in line 457 after 'false;'

     

    This results in a 500 error, so I am probably applyning it wrongly as Geotex apparently has tested it and found no problems...?

     

    Any particular way it should be added if not directly after 'false;'? (please excuse my novice questions)

     

    Here is the code I have tried:

     

    "

    // Check state
            $country_id = getCountryFormat($address['country'], 'numcode', 'id');
            if(!($GLOBALS['config']->get('config', 'disable_estimates')=='1') $user_defined && !CC_IN_ADMIN && $_GET['_a']!=='addressbook' && ((empty($address['state']) && !empty($address['country'])) || ($GLOBALS['db']->select('CubeCart_geo_zone',false, array($state_field => $address['state']))==false) && $GLOBALS['db']->select('CubeCart_geo_zone',false, array('country_id' => $country_id)))) {
                $address_description = empty($address['description']) ? '' : ' ("'.$address['description'].'")';
                $GLOBALS['gui']->setError(sprintf($GLOBALS['language']->address['check_state'],$address_description));
                httpredir("?_a=addressbook&action=edit&address_id=".$address['address_id']);
                return false;
            }


    "

    "

    // Check state
            $country_id = getCountryFormat($address['country'], 'numcode', 'id');
            if($user_defined && !CC_IN_ADMIN && $_GET['_a']!=='addressbook' && ((empty($address['state']) && !empty($address['country'])) || ($GLOBALS['db']->select('CubeCart_geo_zone',false, array($state_field => $address['state']))==false) && $GLOBALS['db']->select('CubeCart_geo_zone',false, array('country_id' => $country_id)))) {
                $address_description = empty($address['description']) ? '' : ' ("'.$address['description'].'")';
                $GLOBALS['gui']->setError(sprintf($GLOBALS['language']->address['check_state'],$address_description));
                httpredir("?_a=addressbook&action=edit&address_id=".$address['address_id']);
                return false;
              if(!($GLOBALS['config']->get('config', 'disable_estimates')=='1')
              && $user_defined &&
              !CC_IN_ADMIN

    "

     

     

  2. bsmither,

     

     

    as you forecasted, some problems arose...

     

    When logged in as a customer and trying to checkout, the following error occurs:

     

    " We seem to have a problem with your address ("Standard faktureringsadresse"). Please check the value for "County" before proceeding."

    Furthermore the client can´t delete items in the cart when logged in.

    Any attempt to change anything when logged in results in the above error.

  3. Geotex is right in pointing this out, but I actually asked for exactly this solution and that is exactly what I got.

     

    The good thing is, that if I suddenly decide to sell to countries with states, I just reverse what bsmither recommended and I will have states back as an option - so anyone can use it and anyone can reverse it if needed at any time...

  4. Geotex,

     

    Thanks again for taking time to try and assist me in my challenges with cubecart.

    The file you mention in js only seems to be present in the default skin 'foundation' and not in any of the other installed skins - I think that maybe some of the other skins borrow some js functionality from the default skin...?

    Anyway - I have changed all 'state' references from 'true' to 'false', saved and then cleared cache in cubecart - then tested again - unfortunately to no avail - the 'state' field still claims it is 'required'

    I have also cleared the browser, changed to a new browser that hasn´t been used on the shop before and tested - to no avail

    Browsers used are Newest Edge,Firefox and Chrome

    My thoughts are that maybe the reason the error message 'billing address missing' comes when ever the field 'state/county' is changed from 'required' to just 'textbox' in the 'content.checkout.confirm.php' file comes because the 'state' field somehow interacts with the 'country' field and whenever the js can´t validate the 'state' field in conjunction with the country, it errors with the 'billing address missing' error...?

     

     

  5. Hi Geotex,

     

    Thanks for taking time to suggest a solution to my problem..

    Actually I have already made that change, unfortunately to no avail:

     

    " <!-- <div><label for="state-list">{$LANG.address.state}</label><span><input type="text" name="state" id="state-list" class="textbox required" value="{$DATA.state}" /> *</span></div>"

     

    As mentioned above, I have tried to comment out on other of the files, and managed to remove the field, but then the form couldn´t be executed as it failed with the error 'address missing' although it actually was the state that was commented out, which leads to believe that the state field has hooks to some other functions, which I unfortunately are not able to find/change...

     

     

  6.  

    These templates may have had their rendered format "cached" by CubeCart. The rendered format will only populate the template with current values of variables, but the HTML of the template, once rendered and put in the cache, does not change.

    Please try this: in admin, Maintenance, Rebuild tab, check Clear Cache and click Submit.

    BSmither, could you please have a look at topic

    'Customize fields on order'

     

    created by me?

    I really need your qualified input to solve a problem...?

     

    Thanks.

  7. Investigating further I have found that I can comment out the 'phone' field without any problems, but when commenting out 'state/county and/or 'country' new problems arise, as there seems to be a hook to somewhere else as that commenting out results in the above error with 'billing address missing'...?

     

    So - kinda 'Cacth22' error - for a novice in programming this is really complicated, whereas it probably is 'common knowledge' for many others - for me however it is extremely difficult to look through all the programming to see what I have to do....

    Therefore - any input much appriciated....

  8. Hmnn,

     

    I have now finally found the correct files to edit (templates/content.checkout.confirm.php), but when editing them and commenting state/county out, I end up with the form claiming that 'billing address missing'...?

    Also - when editing 'content.register.php' and adding address field, this address is not added for some reason...?

    Any ideas?

  9. Thanks for the imput...

    Yes, as You write any change will have to be revised every time there is an update and that is exactly why I suggest that there in future versions will be an option to edit any field at all concerning the order form as this is really a place for customization and that way it will remain the same even after an upgrade...

    Thanks for the 'comment out' idea - I have had the same thought but I unfortunately fail to see which file I have to make the changes in as none of the files I have found concerning the orderform seems to have both phone lines and the files where I have changed/removed the unwanted 'state/county' field had absolutely no effect at all - even not after clearing the cache as suggested by Bsmither...

     

    So - remaing challenges are:

    1. Removal of 'state/county'field permanently

    2. Removal of unwanted phone field

    3. Adding field 'address' in the form option in the top' Sign-up'

     

    Input will be much appreciated ;-)

  10. I am new to cubebart and I struggle to remove a field on the order form.

     

    In my country, we do not use 'state/county' in any way, so having this field set as 'required' per default is annoying.

     

    I have tried to remove the filed by editing in the '/orders.index.php' and the '/orders.print.php' but it keeps being on the order form?

     

    Trying to clear cache also din´t change anything....

     

    How to get rid of it?

     

    I also need to find out how a field is changed from 'required' to 'non-required' on the order form, eg. the field phone and mobile - in my country only few people have a landline based phone anymore, therefore it seems a bit weired to the customers that a landline filed is required to fill out - you might say that they can just put their mobile number in the landline field, yes - but still it is annoying that the field is required

    Actually it would be nice if it was possible to edit the order form completely to make it comply to local settings - many carts has this option built in....

     

    How to change that?

     

    Any assistance is highly appreciated

  11. I still struggle to get rid of the 'state/county' on the orderform...

    I have searched high and low, I have changed everywhere I can find it, butno matter what I do it stays on the orderfrom and do not get away - I can´t even change its 'required' status to non-required...

     

    Any help is much appreciated....

     

     

  12. Hi,

    Hope this thread is no stale in any way...?

    I am new to cubebart and I struggle to remove a field on the order form.

     

    In my country, we do not use 'state/county' in any way, so having this field set as 'required' per default is annoying.

     

    I have tried to remove the filed by editing in the '/orders.index.php' and the '/orders.print.php' but it keeps being on the order form?

     

    How to get rid of it?

×
×
  • Create New...