Jump to content
thirty bees forum

[Free Theme] Niara - Thirty Bees theme


tommat

Recommended Posts

On 3/26/2019 at 4:55 PM, jfnewell1965 said:

@LauraJ  This turned out to be the same issue I had with my site discussed in the post before yours.

By the way, you nail site/idea is cool...I will not be showing my wife or daughter!  🙂

 

Thank you!

Edited by LauraJ
not trying to do personal promotion ... would have deleted if i could
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...
  • 2 months later...

It is  a great theme, thank you for sharing. I have installed on an website and works fine, just with the new products module on the left coolumn I have some issues, the image doesn't render despite regenerating all the images and is displaying a long list of links:

image.png.abd232352b524b5f6a0960ae536ba411.png

Link to comment
Share on other sites

  • 2 weeks later...

Radio buttons not working.

Fresh install of tb1.10 and N1.10 from Softulicious with demo products.

I changed the first group of demo attributes to a radio button in BO>catalog>attributes>flavors>edit>attribute type
It looks fine on the front page but is stuck on the first option on this temporary link. (The only previous change to the site was hacking out some cookies that logged me out of the back office roughly according to these instructions.) 

I tried changing to Community Theme, where the buttons work but are not so pretty!
I tried changing back to Niara, BO>advanced>clear cache, force compilation, turn off cache. 
The same problem occurs on a more developed test site that I have tried with different browsers over time.

Is there something I should check?
Thanks for the theme

Edited by veganline
Link to comment
Share on other sites

This github "patch" for radio-button is working. At least for my install (TB1.1.0 as it is on download page). I don't have latest version of Niara and netamismb reported problem about missing picture with "New product" module is present for me too.

Link to comment
Share on other sites

It works!

I edited-out my previous result ( http://archive.is/fSqBE last post) which might be cured by updates to a bleeding edge version of the theme or more likely something I'd done wrong, Somehow the site just started working without me doing anything, as does a more edited and played-with test site along the same lines.

Edited by veganline
removed http://archive.is/fSqBE (last post) list of previous failure
Link to comment
Share on other sites

8 hours ago, led24ee said:

Is anybody interested of solution when there are also small pictures with results of upper search bar ? I don't know how to make public the solution. I got this working on my site.

It's very usefull to show images and prices of the products in the search bar, I'll might be able to integrate it in the module theme master that I'm working on for Niara theme.

Link to comment
Share on other sites

Force a customer to choose an attribute.
(used to say Disable default attribute too)  

Is there a javascript in the theme that hides default attributes if they are out of stock, and some way to over-ride it so they show, while other out of stock products do not?

What I want to show is 

  • a pretend default attribute called "choose", which is out of stock but still shows. I want to prevent ordering of "choose" and maybe translate the usual pop-up or somehow hide the order button.
  • other size attributes hidden when out of stock or maybe crossed-out & un-order-able

This disables ordering of the default attribute and forces the customer to choose an attribute, rather than buying the smallest shoe by mistake and then sending it back. It requires something like BO>Catalogue>Products>Quantities>"When out of stock Deny orders"

The setting is possible in Default Boostrap Theme, where a default attribute does not get hidden by the setting. The same thing might be possible in other themes by turning on Advanced Stock Management, turning it off again, and setting my product quantities by hand, but I want a reliable way of keeping "choose" available and out of stock while out of stock sizes cannot be ordered.

Any help welcome

 



 

Edited by veganline
Link to comment
Share on other sites

1 hour ago, veganline said:

Disable default attribute ; force a customer to choose an attribute.

Is there a javascript in the theme that hides default attributes if they are out of stock, and some way to over-ride it so they show, while other out of stock products do not?

What I want to show is 

  • a pretend default attribute called "choose", which is out of stock but still shows. I want to prevent ordering of "choose" and maybe translate the usual pop-up or somehow hide the order button.
  • other size attributes hidden when out of stock or maybe crossed-out & un-order-able

This disables ordering of the default attribute and forces the customer to choose an attribute, rather than buying the smallest shoe by mistake and then sending it back. It requires something like BO>Catalogue>Products>Quantities>"When out of stock Deny orders"

The setting is possible in Default Boostrap Theme, where a default attribute does not get hidden by the setting. The same thing might be possible in other themes by turning on Advanced Stock Management, turning it off again, and setting my product quantities by hand, but I want a reliable way of keeping "choose" available and out of stock while out of stock sizes cannot be ordered.

Any help welcome

I think you are over complicating the task at hand. What you really want is to force your customers to choose attributes. You don't need to create any special attributes values, or create dedicated default combinations for your products. That's just crazy. And a lot of work for something that should be pretty simple to do by modifying your template. Also, this *virtual* combination would make other tasks in your store a lot more complicated (data import, export to google merchant center,... )

Here's something to get you started:

Edit file product.tpl in niara theme, find this code

{if ($group.group_type == 'select')}
  <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print">
    {foreach from=$group.attributes key=id_attribute item=group_attribute}
      <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option>
    {/foreach}
  </select>
{elseif ($group.group_type == 'color')}

and replace it with this

{if ($group.group_type == 'select')}
  <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print">
    <option value="0" selected="selected" title="{l s='Choose'}">{l s='Choose'}</option>
    {foreach from=$group.attributes key=id_attribute item=group_attribute}
      <option value="{$id_attribute|intval}" title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option>
    {/foreach}
  </select>
{elseif ($group.group_type == 'color')}

This code changes the dropdown attribute selector:

  1. adds new item named 'Choose' with value 0 -- non-existing attribute value id
  2. make this item pre-selected by default using selected="selected" attribute
  3. remove selected="selected" attribute from default attribute -- inside {foreach} cycle

I've tested it, and it works quite nice. If you are using other types of attributes (color / radio) you will need to modify these as well, in similar manner.

 image.png.f068931a945a623499800ffdf6199420.png  image.png.9e0a3974268e628d4abf93f4a1ece876.png   

  

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

My guess

Quote

{if ($group.group_type == 'select')}
  
  {*new line*}
  <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print">
  {*Adds new item named 'Choose' with value 0 -- non-existing attribute value id*} 
  {*Makes this item pre-selected by default using selected="selected" attribute*}
  {*Non-existing value triggers an existing script to hide the purchase button*} 
  {*The button is displayed again when you choose all attributes*}

      {foreach from=$group.attributes key=id_attribute item=group_attribute}
      
      {*remove selected="selected" attribute from default attribute -- inside {foreach} cycle*}
      {***<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if}***}
      
      title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option>
    {/foreach}
  </select>
{elseif ($group.group_type == 'color')}

Please let me know of any typos😀

(added 24/5/2020 - 
https://www.thekeylesslab.com/2018/06/13/how-to-disable-default-combination-for-products/ has the same code and explanation.
The template bit works alone on Thirtybees but
- angled quotes make it hard to cut and paste
- there are no titles in the code, making it a bit easier to follow otherwise)

I added "triggers an existing script" without knowing what script, which leads to my next question

Edited by veganline
removed long question. answered post above. will write a short question below
Link to comment
Share on other sites

Custom field in the product order form
No effect on stock control

  • I want the customer to add a drop-down field to each order, but I don't need any stock control in the database for this - just an extra number somewhere on the order would be fine, like a customization field, or some characters after the product name. It should be compulsory.
     
  • I want "When out of stock: Deny orders" for the this product.

I can see some old long threads headed things like "move customization" on the product.tpl template, lines 625-715, and then trying to get the two form submit buttons to work together. 

I hope there's a simpler work-around. But if I just add a <select> field to the product name i trigger the same script as in the post above, whatever it is, and hide the order button.

Has anyone found a simple work-around?

-----------------------------------------------------------17.11.19.18.40
I moved the customization form, but it still requires a separate button.

Product.js looks like the script, but could it be changed to allow extra information, maybe at the end of the product name, without breaking anything else?

Edited by veganline
17.11.19.18.40
Link to comment
Share on other sites

  • 2 months later...

@tommat

Thanks for this theme.

I remember, hopefully correctly, TB has a feature to alert the customer that a different pack size/combination is in stock when a different combination is clicked.

I don't see that working on my Niara based shop. Can you please advise if this is a theme thing and can be fixed easily?

Link to comment
Share on other sites

  • 2 weeks later...
On 11/4/2019 at 4:55 PM, zen said:
please have a look here to this commit : https://github.com/thirtybees/niara/commit/bfe7676bed66bca05bccddffd28c0d0aaa5799b9 it might fix your problem. ref here:

Anyone reading this might want a lazy version of Zen's solution. It works on Chrome desktop and I guess on most browsers. It is a bit of style sheet to add from the back office, over-riding the styles that need changing rather than editing them.
Back > modules and services > custom code | add css

/* Niara 1.1 patch to make radio buttons work */
input[type="checkbox"] input[type="radio"] .attribute_radio .attribute_list {
cursor:pointer;
opacity:1;
position:absolute;
width:auto!important;
float:none!important;
margin:auto;
right:auto;
left:auto;
}
Edited by veganline
changed opacity to 1; the style sheet tries to use an image over the top of a hidden radio button and this reverses the process
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...