Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
General discussion / can someone help with a pwa?
« Last post by happymewtwo on April 20, 2024, 03:19:47 PM »
Can someone help with the sw.js for a pwa? I created mine and it's not working.
22
General discussion / Re: Unable to insert new keyword category mapping (own add-on)
« Last post by mwindey on April 20, 2024, 02:08:25 PM »
In queries.log there is no table inserts on the table  ...  Table mdr_item_archive however has:  "select_1\":0,\"selectedCategoryId\":294,\"keywordMapping\":\'jas:294\",\"countryId\":\"be\",\".......... etc....
keywordmapping is what needs to be in in keyword and category colums from table keyword_category_mapping. Shouldn't this be more specific like "keywordMapping\":\"keyword: jas: category 294\",\" ?
Payload in console after posting:
octoken: llhx4gaxmimg
action: item_add_post
page: item
sKeyword: jas
foundCategory: 294
catId: 294
select_1: 0
selectedCategoryId: 294
keywordMapping: jas:294
octoken: llhx4gaxmimg

Params to model in item-post after validate (end of page):
Code: [Select]
    contactEmail: {
      required: '<?php echo osc_esc_js(__('Email: this field is required.''epsilon')); ?>',
      email: '<?php echo osc_esc_js(__('Email: invalid format of email address.''epsilon')); ?>'
    }
 },

  ignore: ":disabled",
  ignoreTitle: false,
  errorLabelContainer: "#error_list",
  wrapper: "li",
  invalidHandler: function(form, validator) {
    $('html,body').animate({ scrollTop: $('body').offset().top}, { duration: 250, easing: 'swing'});
  },
  submitHandler: function(form){
    $('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
    form.submit();
  }
   });
});
// Code to save keyword and id into database
if (Params::existParam('keywordMapping')) {
    $keywordMapping = Params::getParam('keywordMapping');
    if (!empty($keywordMapping)) {
        list($keyword, $catId) = explode(':', $keywordMapping);
        ModelEPS::newInstance()->saveCategoryMapping($keyword, $catId);
    }
}
</script>
<?php osc_current_web_theme_path('footer.php'); ?>
</body>
</html>

Witch i guess is not activating the modelEPS function... Maybe this should be in functions instead of item-post after validating code....
23
Code looks fine, try to debug what params you are entering to function.
Enable database debug log and at the end of function add exit.
After oublish you will be able to see wueries executed on DB and check i its not query issue
24
General discussion / Unable to insert new keyword category mapping (own add-on)
« Last post by mwindey on April 20, 2024, 12:06:29 PM »
I wrote a script to search for keyword and catId from items that users are posting to my website and save this for later use ....I'm unable to get the correct data into the database. The data is being requested and when sent, it's correctly passed to the payload in the console. In the queries log, these entries also appear in the table mdr_item_archive, so they are being sent. However, they're not appearing in the table oc_t_keyword_category_mapping, which I created myself. I've been searching for a solution for days but I think there's a flaw in the logic...
Table DROP TABLE IF EXISTS `oc_t_keyword_category_mapping`;
CREATE TABLE `oc_t_keyword_category_mapping` (
  `id` int(11) NOT NULL,
  `keyword` varchar(255) DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `oc_t_keyword_category_mapping`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `oc_t_keyword_category_mapping`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

Function is in modelEPS (epsilon theme) and is called by item-post on posting the listing. Untill there everything is ok but i guess the logic in the model is not correct.... This is what i have so far:
Code: [Select]
public function saveCategoryMapping($keyword, $catId) {
    try {
        $existingMapping = $this->dao->select('*')
            ->from($this->getTable_keyword_category_mapping())
            ->where('keyword', $keyword)
            ->get();

        if ($existingMapping && $existingMapping->numRows() > 0) {
            $data = array(
                'category' => $catId
            );
            $this->dao->where('keyword', $keyword);
            $this->dao->update($this->getTable_keyword_category_mapping(), $data);
        } else {
            $data = array(
                'keyword' => $keyword,
                'category' => $catId
            );
            $this->dao->insert($this->getTable_keyword_category_mapping(), $data);
        }

    } catch (Exception $e) {
        throw $e;
    }
}


Please help....
25
Seo Plugins / Re: SEO Pro not showing Region when visiting City
« Last post by MB Themes on April 19, 2024, 05:16:11 PM »
It is about active parameters, not about website content.
26
Osclass Pay Plugin / Re: Auto republish not working
« Last post by webcity on April 18, 2024, 05:46:56 PM »
Hi,

I'm running the system cron job, it seems to be working OK for everything else and Osclass Pay says that the cron is running too. I have included a screenshot of the cron update.

There are no errors showing in the error file log with error logging enabled.

I set a demo republish for the item https://plugins4.abprofitrade.eu/vehicles/motorcycles/iphone-x-perfect-status_i3082 to be renewed 10 times but it only renewed the once, like my site.

Can you suggest a solution?

Many thanks
27
Seo Plugins / Re: SEO Pro not showing Region when visiting City
« Last post by webcity on April 18, 2024, 05:11:15 PM »
Shouldn't the region and city show for both URL's? the second URL shows the same content as the first URL.

The Region and City parameters have been specified but only the City shows

28
Seo Plugins / Re: SEO Pro not showing Region when visiting City
« Last post by MB Themes on April 18, 2024, 05:03:44 PM »
2nd URL is without region as parameter.
29
Seo Plugins / Re: SEO Pro not showing Region when visiting City
« Last post by webcity on April 18, 2024, 02:42:28 PM »
Hi,

Thanks for the reply.

Region is available but when I put the region tag in the title it doesn't show, just the city shows.

https://plugins4.abprofitrade.eu/search/region,Delaware/city,Blades/ should show Blades, Delaware in the title as I've configured SEO Pro to show City and Region.

And : https://plugins4.abprofitrade.eu/blades-c6141541
30
Seo Plugins / Re: SEO Pro not showing Region when visiting City
« Last post by MB Themes on April 18, 2024, 11:02:11 AM »
If region is available as parameter, then region is added too.
Pages: 1 2 [3] 4 5 ... 10