TOPIC:

first use - questions on stock, options, inserting modules 2 weeks 5 days ago #248064

  • Topic Author
  • marcusadamski
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Hello Markus,

I'm not familiar with the BC framework yet, so I don't fully understand the consequences when I'm playing with the code, but would the following cause any issues? I've moved the loadposition code so it processes the description text, then the original code deals with the readmore:
        ...

        // translations
        $this->_data->description_translation = '';
        $this->_data->title_translation = '';
        $this->_data->alias_translation = '';
        
        if($this->_id){
            $translated_object = CrBcHelpers::loadTranslation($this->_id, 'product');
            if($translated_object !== null){
                $this->_data->description = $translated_object->body;
                $this->_data->title = $translated_object->title;
                $this->_data->alias = $translated_object->alias;
            }
        }        
                
        // process manually inserted 'loadposition' tags
        $regex = '/{loadposition\s+(.*?)}/i';

        preg_match_all($regex, $this->_data->description, $matches, PREG_SET_ORDER);

        if ($matches) {

            $document	= JFactory::getDocument();
            $renderer	= $document->loadRenderer('modules');
            $options	= array('style' => 'xhtml');

            foreach ($matches as $match) {

                $matcheslist =  explode(',', $match[1]);
                $position = trim($matcheslist[0]);
                $output = $renderer->render($position, $options, null);
                $this->_data->description = preg_replace("|$match[0]|", addcslashes($output, '\\'), $this->_data->description, 1);
            }
        }         
                
        // split description into intro and full text
        $introtext = '';
        $fulltext  = '';
        $desc = str_replace('<br>', '<br />', $this->_data->description);
    
        ...


It doesn't make any difference if a readmore tag exists or not, it should work either way. Would this break anything else (I'm only using a limited scenario for my first bc site).

Many thanks
Marc

Please Log in or Create an account to join the conversation.

first use - questions on stock, options, inserting modules 2 weeks 3 days ago #248134

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 800
Does it render the module position in the category where all the products are listed?
If not then it should be fine (and I would use your contribution with future updates).

Please Log in or Create an account to join the conversation.

first use - questions on stock, options, inserting modules 2 weeks 3 days ago #248161

  • Topic Author
  • marcusadamski
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Hi Markus,

Although the loadposition tag appears in the category view (e.g. if intro text turned on and the loadposition tag is inserted before the readmore OR "Enable Simple Product View" is disabled so the entire description is shown" - the loadposition tag is shown only as text and not rendered.

That's what I've seen from my limited testing.

Many thanks
Marc

Please Log in or Create an account to join the conversation.

first use - questions on stock, options, inserting modules 2 weeks 3 days ago #248162

  • Topic Author
  • marcusadamski
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Hi Markus ,

Whilst testing this change, I had to make changes to the menu item for the category view. E.g. "Display Product Intro Text" and "Enable Simple Product View". However in the same set of options, "Override Default Options" was No.

Can you please explain how the "Override Default Options" setting works. I would have thought because it was set to No, then the "Configuration->Misc->Default Category Options" would take priority over the category menu - but this didn't appear to be case. Just so I understand going forward.

Many thanks
Marc

Please Log in or Create an account to join the conversation.

first use - questions on stock, options, inserting modules 2 weeks 1 day ago #248188

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10063
  • Karma: 167
  • Thanks: 800
Hi,

each category menu item should pick up the settings from Misc => Default Category Options if override is turned off.

Please Log in or Create an account to join the conversation.

first use - questions on stock, options, inserting modules 1 week 3 days ago #248471

  • Topic Author
  • marcusadamski
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Hi there,

Regarding the "Category Settings->Override Default Options", unfortunately it doesn't appear to work as you suggest.

Given the attachments, I have the following results:

Note "Override Default Options=No"

- Product image is shown (should be hidden as per default settings)
- Title is linked (should not be linked as per default settings)
- Sort is not shown ( but should be shown as per default settings)
- Block view selection not shown (but should be shown as per default settings)
- List view selection is not shown (but should be shown as per default settings)


I've hard refreshed the webpage a few times, but it made no difference. I've also tried :
  • "Override Default Options=yes"
  • saved
  • then back to "Override Default Options=no"
  • saved
.. but again, made no difference.


It appears the menu options always override the default options.

Any help to understand this would be great. Many thanks
Marc
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.106 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!