params= new JRegistry(); $this->params->loadString($plugin->params, 'JSON'); $this->_cacheEnabled = $this->params->get('cache_enabled'); if ($this->_cacheEnabled === null) $this->_cacheEnabled == 1; $this->_autoflush = $this->params->get('autoFlush'); if ($this->_autoflush === null) $this->_autoflush = 1; $this->_autoflush3rdParty = $this->params->get('autoFlush-ThirdParty'); if ($this->_autoflush3rdParty === null) $this->_autoflush3rdParty = 1; $this->_autoflushClientSide = $this->params->get('autoFlush-ClientSide'); if ($this->_autoflushClientSide === null) $this->_autoflushClientSide = 0; } /** * Heartbeat cache checking function. Will also monitor $_GET for the jSGCache parameter * (pressing the purge cache button in admin) * * * @access public * @return null */ public function onAfterInitialise() { if (!$this->_cacheEnabled || $this->_isBlacklisted($this->_applicationPath)) { JResponse::setHeader('X-Cache-Enabled','False',true); return; } if ($this->_cacheEnabled) { JResponse::allowCache(true); JResponse::setHeader('X-Cache-Enabled','True',true); } //Init the application url $this->_applicationPath = str_replace(array('administrator/index.php','index.php'),'',str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['SCRIPT_FILENAME'])); //Check for any admin action and proceed to flushMonitor and 3rd party plugins if ( isset($_POST['task']) || isset($_GET['task']) || isset($_GET['cart_virtuemart_product_id'])) { $this->_flushMonitor(); if ($this->_autoflush3rdParty) $this->_monitorThirdPartyPlugins(); } //Check if we have a logged in user and enable cache bypass cookie 'task' => string 'user.login' $user = JFactory::getUser(); if (!$user->guest || (isset($_POST['task']) && preg_match('/login/i', $_POST['task']))) { $_POST[JSession::getFormToken()] = 1; //Force the correct token, since the login box on the page is cached with the 1st visitors' token //Enable the cache bypass for logged users by setting a cache bypass cookie setcookie('jSGCacheBypass',1,time() + 6000,'/'); } if ($user->guest || (isset($_POST['task']) && $_POST['task'] == 'user.logout')) { //Remove the bypass cookie if not a logged user if (isset($_COOKIE['jSGCacheBypass'])) setcookie('jSGCacheBypass',0, time() - 3600,'/'); } // Handle purge button press when get has jSGCache=purge, but only in admin with a logged user if(isset($_GET['jSGCache']) && $_GET['jSGCache'] == 'purge' && JFactory::getApplication()->isAdmin() && !$user->guest ) $this->_purgeCache(true); } /** * Admin panel icon display * * @access public * @param string $context * @return array */ public function onGetIcons( $context ) { return array(array( 'link'=>'?jSGCache=purge', 'image'=>'refresh', 'text'=>JText::_('Purge jSGCache'), 'id'=>'jSGCache' )); } /** * Calls the cache server to purge the cache * * @access public * @param string|bool $message Message to be displayed if purge is successful. If this param is false no output would be done * @return null */ private function _purgeCache( $message = true ) { $purgeRequest = $this->_applicationPath . '(.*)'; // Construct the PURGE request $hostname = str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ); $purge_method = "PURGE"; $cacheServerSocket = fsockopen($hostname, 80, $errno, $errstr, 2); if(!$cacheServerSocket) { JError::raise(E_ERROR,500,JText::_('Connection to cache server failed!')); JError::raise(E_ERROR,500,JText::_($errstr ($errno))); return; } $request = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: {$_SERVER['SERVER_NAME']}\r\nConnection: Close\r\n\r\n"; if (preg_match('/^www\./',$_SERVER['SERVER_NAME'])) { $domain_no_www = preg_replace('/^www\./', '', $_SERVER['SERVER_NAME']); $request2 = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: {$domain_no_www}\r\nConnection: Close\r\n\r\n"; } else $request2 = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: www.{$_SERVER['SERVER_NAME']}\r\nConnection: Close\r\n\r\n"; fwrite($cacheServerSocket, $request); $response = fgets($cacheServerSocket); fclose($cacheServerSocket); $cacheServerSocket = fsockopen($hostname, 80, $errno, $errstr, 2); fwrite($cacheServerSocket, $request2); fclose($cacheServerSocket); if($message !== false) { if(preg_match('/200/',$response)) { if ($message === true) JFactory::getApplication()->enqueueMessage(JText::_('SG Cache Successfully Purged!')); else JFactory::getApplication()->enqueueMessage(JText::_( $message )); } else { JError::raise(E_NOTICE,501, JText::_('SG Cache: Purge was not successful!')); JError::raise(E_NOTICE,501, jText::_('Error: ' . $response)); } } } /** * Check if url is in caching blacklist * * @param string $applicationPath * * @return bool */ private function _isBlacklisted($applicationPath) { $blacklistArray = explode("\n",$this->params->get('blacklist')); $blacklistRegexArray = array(); $indexIsBlacklisted = false; foreach($blacklistArray as $key=>$row) { $row = trim($row); if ($row != '/' && $quoted = preg_quote($row,'/')) $blacklistRegexArray[$key] = $quoted; if ($row == '/') $indexIsBlacklisted = true; } if ($indexIsBlacklisted && $_SERVER['REQUEST_URI'] == $applicationPath) return true; if (empty($blacklistRegexArray)) return false; $blacklistRegex = '/('.implode('|',$blacklistRegexArray) . ')/i'; return preg_match($blacklistRegex, $_SERVER['REQUEST_URI']); } /** * 3rd party plugin monitor * * @access private * @return null */ private function _monitorThirdPartyPlugins() { // Kunena & K2 if ($this->params->get('autoFlush-ThirdParty') == 1 && isset($_POST['option']) && ($_POST['option']=='com_k2' || $_POST['option' ]== 'com_kunena')) { $this->_purgeCache(false); } // VirtueMart if ( (isset($_POST['option']) && $_POST['option'] == 'com_virtuemart') || ( isset($_GET['option']) && $_GET['option'] == 'com_virtuemart' ) || isset($_GET['cart_virtuemart_product_id']) ) { if($this->params->get('autoFlush-ThirdParty') == 1) $this->_purgeCache(false); } } /** * Action monitor * * @access private * @return null */ private function _flushMonitor() { $user = JFactory::getUser(); if ((!JFactory::getApplication()->isAdmin() && !$this->_autoflushClientSide) || $user->guest) return; $autoflush = $this->params->get('autoFlush'); if ($autoflush === null) $autoflush = 1; if (isset($_POST['task']) && $_POST['task'] && !in_array($_POST['task'],self::$_ignoreTasks) && $autoflush == 1) $this->_purgeCache(false); } } Community Support Forums - Sellacious
  Sunday, 04 November 2018
  10 Replies
  1.4K Visits
  Subscribe
How do I bring in all the Joomla Users as Sellacious Users in the User Profile.
5 years ago
·
#2585
Hello Raji,

When you install sellacious on Joomla, all Joomla user will automatically become sellacious client users.

Thank You
-Team Sellacious
5 years ago
·
#2586
Thanks for the update.... but I don't see any of them listed in the Sellacious Users list.

When I tried to add one of the Users who is already in the Joomla list as a SELLER, Sellacious says that emailID/Username is already in use. Clearly that indicates that it is seeing the Joomla User.

However, when I list an item from the Admin back-end screen, I couldn't add that User as the Seller for the item.
5 years ago
·
#2587
Hello,

Can you send us your site credentials through DM so, I can have a look myself? and also please send me the name or email of the seller you want to create.

Thank You
-Team Sellacious
5 years ago
·
#2603
Thank you for the support. I have investigated further and learned how to create Sellers.

But now I am observing another issues. Completed purchase transactions are not appearing in the Transactions section. All Sales are setup as Cash On Delivery with no Payment processing online. Secondly, although I get the transaction successfully completed message, the quantity of the product purchased is NOT getting decremented. If I have 2 items and even if someone had purchased both items, the Product listings still shows 2 as available.

Is there anything I need to do to decrements the quantity.
5 years ago
·
#2610
Hello Reji,

You need to update the order status from Payment Pending Approval to Payment Approved. Go to Sellacious Administrator > Shop > Orders. As in sellacious by default COD in not payment approved. Once you update the order, the ordered product will decrement.

You can also change the payment status for this payment method from the Sellacious Administrator > Settings > Payment Methods > Cash On Delivery. Open this method and select Success status "Payment Approved".

I hope this helps.

Thank You
-Team Sellacious
5 years ago
·
#2628
Thank you for the instructions. But I have already had the "Payment Approved" method set for the "Cash on Delivery" payment method. What I am noticing is that the Transactions are not getting recorded on the "Transactions" section for some reason. I made a sample purchase and completed the transaction (Check out) as a "Cash on Delivery". And the Admin and the Buyer got their letter of confirmation also. However, the transaction never got recorded and the item was never decremented. I am not sure if I am missing any settings.
5 years ago
·
#2631
Hello Reji,

Can you check the orders and tell me payment status of that order? You can check that from Sellacious administrator > Shop > Orders.

Thank You
-Team Sellacious
5 years ago
·
#2633
Hello,

Well the Payment status is still " Payment Pending Approval". I didn't know about the Orders section. But nevertheless, not sure why it is still payment Pending Approval, when I have the "Payment Approved" set for "Cash on Delivery".

Is there a way that we can set the payment to process as soon as the transaction is completed without approval?
5 years ago
·
#2634
Hello Reji,

Yes, You can do that from the Sellacious administrator > Settings > Payment Method > COD. Open that method and set Success status as "Payment Approved" (Check Screen-shot)

https://www.sellacious.com/community-support?controller=attachment&task=download&tmpl=component&id=461

I hope this helps.

Thank You
-Team Sellacious
5 years ago
·
#2635
Yes, thank you. I had it already setup like that... but perhaps those transactions went through while I was making changes to the settings. In any case, it seems to be working now. I will keep monitoring to see if there are any issues.

Thanks for your prompt replies.
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
  • +1 (408) 821-8283
  • Email hello@sellacious.com