Jump to content
thirty bees forum

zen

Trusted Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    68

Posts posted by zen

  1. 16 hours ago, Occam said:

    This already has a tiny disadvantage: the Niara theme won't find the images afterwards, because in the theme as well as in many modules the picture format names are hard coded - no matter what @zen believes.

    I do believe that everything can be fix.. otherwize I don't know what you think I believe... I just want to help this user on his particular case, that should not happen, but before fixing the core, this user needs specific help in his settings, and I'll provide this care if he accepts.

    I know images are harcoded, that's where the matter starts, Also there is way  too much images sizes for produits... only 3 or 4 will be enough and will help to maintain an image directory light.

  2. Now you did this, your theme request this image :

    https://product.solutions.org.nz/194-community-theme-default_cart_default/remote-car-alarm-with-central-locking-and-engine-disable.jpg

    then you need this image setting : community-theme-default_cart_default,

    what size is it ? I don't know but it's should be square I guess.

     

    Also on the same page you need also this image : https://product.solutions.org.nz/98-home/3000-lumen-headlight-with-sensor-and-red-light.jpg

    and that is "home"

  3. datakick was right : you need "home" as a default image size, but it's not available on your settings, so it's not created, therefore you can't show them in front office.

    You need to edit the images config, and delete all images sizes wich are not used and estup one for "home" and others missing.. then regenerate thumbnails !

  4. For you only, because you know the results and it fits your needs, here is the modified code :

       // Will update default category with the first new one given. Home if no category at all.
    	if (isset($product->id_category[0])) {
                $product->id_category_default = (int) $product->id_category[0];
            } else {
                $defaultProductShop = new Shop($product->id_shop_default);
                $product->id_category_default = Category::getRootCategory(null, Validate::isLoadedObject($defaultProductShop) ? $defaultProductShop : null)->id;
            }

    et voilà...  and if we have a button.. or the new column.. then the deleted IF condition will take car of it... So Simple ^^

  5. Like you said, you CAN use the csv to update infos.. but it's not really his purpose, the main goal for csv is to import products on an empty shop, then more options have been added, So you can do whatever you want for that,

    In my case, I update default cat by SQL queries, directly on phpmyadmin, so fast and so efficient, I don't bother using csv.

    On your github issue it resumes what I said to you :

    Solution 1 : Adding a column in import file with default value

    or  Solution 2 : Create a checkbox in the form

    If this have been really usefull, and used by many.. this will have been done since a long time, but now you are the second to ask it, maybe it will be done soon.

  6. If your product is already setup, and you upload more infos... would you like theses previous infos to be deleted ?? I don't ! It will kill the shop for most of users.

    And When you give categories to add to your product, wich one is the default one ?? the first one ? the last one ?? the one in the middle maybe ?? or by cat ID ordered INC or DESC... who knows : So I tel you again this is not a BUG ! even if it doesn't suits your own needs on that case.. it the best for most users, now you can add one more column for DEFAULT CAT and update the script so it will assign that and remove the old one.

    Read the comments in the code, it's only logic.

     

  7. 8 minutes ago, Theo said:

    Hi Zen

    Thanks for the feedback. Yes, this is what I'm looking for. I will have a look at this code and see if I can figure it out and make it do what I want it to do.
    The only thing is: surely what the system doing is a bug? 
    Because, unless I'm mistaken, the system should always allow you to update a target product's category and then set this category as default (via CSV Import update)?

     

    It is not a bug.. it is a functionnality 🙂 lol

    CSV import is good and doing what you want on the first import.. if your product has already a dafault category setup, the csv import will not update that default category assigned, if you want it different you have to change the code.

    On my opinion it is totally normal behaviour, better not delete the default category with csv... just adding more is better option I think, it will need maybe a new column to force default category ID to be setup and everybody will be happy then.. have to think about adding it to csv import system.

  8. in the community-theme-default, you'll have to edit "address.tpl" file

    starting line 103

          {if $field_name eq 'postcode'}
            {assign var="postCodeExist" value=true}
            <div class="required postcode form-group unvisible">
              <label for="postcode">{l s='Zip/Postal Code'} <sup>*</sup></label>
              <input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html':'UTF-8'}{/if}{/if}">
            </div>
          {/if}
          {if $field_name eq 'city'}
            <div class="required form-group">
              <label for="city">{l s='City'} <sup>*</sup></label>
              <input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{else}{if isset($address->city)}{$address->city|escape:'html':'UTF-8'}{/if}{/if}" maxlength="64" required>
            </div>
            {* if customer hasn't update his layout address, country has to be verified but it's deprecated *}
          {/if}
          {if $field_name eq 'Country:name' || $field_name eq 'country' || $field_name eq 'Country:iso_code'}
            <div class="required form-group">
              <label for="id_country">{l s='Country'} <sup>*</sup></label>
              <select id="id_country" class="form-control" name="id_country" required>{$countries_list}</select>
            </div>
          {/if}
          {if $field_name eq 'State:name'}
            {assign var="stateExist" value=true}
            <div class="required id_state form-group">
              <label for="id_state">{l s='State'} <sup>*</sup></label>
              <select name="id_state" id="id_state" class="form-control">
                <option value="">-</option>
              </select>
            </div>
          {/if}

    and change it for that :

          {if $field_name eq 'city'}
            <div class="required form-group">
              <label for="city">{l s='City'} <sup>*</sup></label>
              <input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" name="city" id="city" value="{if isset($smarty.post.city)}{$smarty.post.city}{else}{if isset($address->city)}{$address->city|escape:'html':'UTF-8'}{/if}{/if}" maxlength="64" required>
            </div>
            {* if customer hasn't update his layout address, country has to be verified but it's deprecated *}
          {/if}
    	{if $field_name eq 'State:name'}
            {assign var="stateExist" value=true}
            <div class="required id_state form-group">
              <label for="id_state">{l s='State'} <sup>*</sup></label>
              <select name="id_state" id="id_state" class="form-control">
                <option value="">-</option>
              </select>
            </div>
          {/if}
    	{if $field_name eq 'postcode'}
            {assign var="postCodeExist" value=true}
            <div class="required postcode form-group unvisible">
              <label for="postcode">{l s='Zip/Postal Code'} <sup>*</sup></label>
              <input class="is_required validate form-control" data-validate="{$address_validation.$field_name.validate}" type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html':'UTF-8'}{/if}{/if}">
            </div>
          {/if}
          {if $field_name eq 'Country:name' || $field_name eq 'country' || $field_name eq 'Country:iso_code'}
            <div class="required form-group">
              <label for="id_country">{l s='Country'} <sup>*</sup></label>
              <select id="id_country" class="form-control" name="id_country" required>{$countries_list}</select>
            </div>
          {/if}

     

  9. Hello,

    In the back office go to : Localization >> Countries

    and click on right side button : "edit" for the country you want, here it's United States

    from there you have Address format ... Then Here you go ! 🙂
     

    firstname lastname
    company
    address1 address2
    city, State:name postcode
    Country:name
    phone
    phone_mobile

    change the line you want and order it as you like.

    • Like 2
  10. IF I understand you good, you have problem on CSV products import but for updating products categorie default only ?

    here is the piece of code that I think is doing the thing from AdminImportController.php file :

    
            // Will update default category if there is none set here. Home if no category at all.
            if (!isset($product->id_category_default) || !$product->id_category_default) {
                // this if will avoid ereasing default category if category column is not present in the CSV file (or ignored)
                if (isset($product->id_category[0])) {
                    $product->id_category_default = (int) $product->id_category[0];
                } else {
                    $defaultProductShop = new Shop($product->id_shop_default);
                    $product->id_category_default = Category::getRootCategory(null, Validate::isLoadedObject($defaultProductShop) ? $defaultProductShop : null)->id;
                }
            }

    That means If the product has already a default category assigned, the new import csv will not erase it and keep it, while adding news categories to the product settings.

     

    PS: Note that ID cat '1' is Root and Home is '2', so if you want products assign to home use ID 2 instead of 1.

  11. Hello,

    here is the beta version of a new module for homepage, based on default TB home page slider, so you'll find the place to upload images and configuration in the BO like the other one but this one use Jquery VEGAS SlideSHOW

    https://vegas.jaysalvat.com/

    This is first version, it needs improvement to add more options and being able to choose the place where to show it, it can be real background slides or just a FULL screen, or full minus header, etc..

    Please give comments if you have some .

     

     

    vegasslider.zip

    • Like 1
  12. just to do it fast, you can change the old content of  "/js/jquery/plugins/jqzoom/jquery.jqzoom.js" by this one here :

    https://raw.githubusercontent.com/jackmoore/zoom/master/jquery.zoom.min.js

    infos here : https://raw.githubusercontent.com/jackmoore/zoom/

    no need of the css file anymore in the jqzoom directory..

    it works instantly 🙂

     

    Later I'll try to dig into that on github and fix that properly.

     

    • Like 1
×
×
  • Create New...